|
2 | 2 | {namespace fusion=Neos\Fusion\ViewHelpers}
|
3 | 3 | <script src="../../../Public/JavaScript/jquery-1.10.2.min.js"></script>
|
4 | 4 | <script>
|
5 |
| - $(function() { |
6 |
| - $('#newCommentForm').submit(function(event) { |
7 |
| - var form = $(this); |
8 |
| - $.ajax({ |
9 |
| - type: form.attr('method'), |
10 |
| - url: form.attr('action'), |
11 |
| - data: form.serialize() |
12 |
| - }).done(function(result) { |
13 |
| - alert(result); |
14 |
| - location.reload(true); |
15 |
| - }).fail(function(result) { |
16 |
| - alert(result.responseText.substring(4)); |
17 |
| - }); |
18 |
| - event.preventDefault(); |
19 |
| - }); |
20 |
| - }); |
| 5 | + $(function () { |
| 6 | + $('#newCommentForm').submit(function (event) { |
| 7 | + var form = $(this); |
| 8 | + $.ajax({ |
| 9 | + type: form.attr('method'), |
| 10 | + url: form.attr('action'), |
| 11 | + data: form.serialize() |
| 12 | + }).done(function (result) { |
| 13 | + alert(result); |
| 14 | + location.reload(true); |
| 15 | + }).fail(function (result) { |
| 16 | + alert(result.responseText.substring(4)); |
| 17 | + }); |
| 18 | + event.preventDefault(); |
| 19 | + }); |
| 20 | + }); |
21 | 21 | </script>
|
22 | 22 | <article itemscope="" itemtype="http://schema.org/Article" class="robertlemke-plugin-blog" xmlns:f="http://www.w3.org/1999/html">
|
23 |
| - <f:flashMessages class="flashmessages" /> |
24 |
| - <header> |
25 |
| - <h1 itemprop="name headline"><neos:contentElement.editable tag="span" property="title">{title}</neos:contentElement.editable></h1> |
26 |
| - <div class="byline"> |
27 |
| - by |
28 |
| - <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"><span itemprop="name">{author}</span></span> |
29 |
| - on |
30 |
| - <time datetime="{f:format.date(date: datePublished, format: 'c')}" itemprop="datePublished"><f:format.date format="F jS, Y">{datePublished}</f:format.date></time> |
31 |
| - </div><br /> |
32 |
| - </header> |
33 |
| - <div itemprop="articleBody"> |
34 |
| - {main -> f:format.raw()} |
35 |
| - </div> |
36 |
| - <hr /> |
37 |
| - <div id="comments" class="comments"> |
38 |
| - <f:if condition="{numberOfComments}"> |
39 |
| - <h3><f:translate package="RobertLemke.Plugin.Blog">Comments</f:translate></h3> |
40 |
| - <ol class="commentlist"> |
41 |
| - {comments -> f:format.raw()} |
42 |
| - </ol> |
43 |
| - <div class="clear"></div> |
44 |
| - </f:if> |
45 |
| - <h3><f:translate package="RobertLemke.Plugin.Blog">Leave a reply</f:translate></h3> |
46 |
| - <f:render partial="FormErrors" arguments="{for: 'newComment'}" /> |
47 |
| - <f:form action="create" controller="Comment" package="RobertLemke.Plugin.Blog" object="{newComment}" name="newComment" class="newcomment" id="newCommentForm"> |
48 |
| - <f:form.hidden name="postNode" value="{node.path}" /> |
49 |
| - <label for="comment.author"><f:format.raw> |
50 |
| - <f:translate package="RobertLemke.Plugin.Blog">Name <span class="required">*</span></f:translate> |
51 |
| - </f:format.raw></label> |
52 |
| - <f:form.textfield id="comment.author" property="author" /> |
53 |
| - <label for="comment.emailaddress"><f:format.raw> |
54 |
| - <f:translate package="RobertLemke.Plugin.Blog">Email <span class="required">*</span> (won't be displayed)</f:translate> |
55 |
| - </f:format.raw></label> |
56 |
| - <f:form.textfield id="comment.emailaddress" property="emailAddress" /> |
57 |
| - <f:form.textarea id="comment.text" property="text" rows="10" cols="50"/> |
58 |
| - <button class="secondary button">{f:translate(value: 'Submit', package: 'Neos.Flow')}</button> |
59 |
| - </f:form> |
60 |
| - </div> |
| 23 | + <f:flashMessages class="flashmessages"/> |
| 24 | + <header> |
| 25 | + <h1 itemprop="name headline"> |
| 26 | + <neos:contentElement.editable tag="span" property="title">{title}</neos:contentElement.editable> |
| 27 | + </h1> |
| 28 | + <div class="byline"> |
| 29 | + by |
| 30 | + <span itemprop="author" itemscope="" itemtype="http://schema.org/Person"><span itemprop="name">{author}</span></span> |
| 31 | + on |
| 32 | + <time datetime="{f:format.date(date: datePublished, format: 'c')}" itemprop="datePublished"> |
| 33 | + <f:format.date format="F jS, Y">{datePublished}</f:format.date> |
| 34 | + </time> |
| 35 | + </div> |
| 36 | + <br/> |
| 37 | + </header> |
| 38 | + <div itemprop="articleBody"> |
| 39 | + {main -> f:format.raw()} |
| 40 | + </div> |
| 41 | + <hr/> |
| 42 | + <div id="comments" class="comments"> |
| 43 | + <f:if condition="{numberOfComments}"> |
| 44 | + <h3> |
| 45 | + <f:translate package="RobertLemke.Plugin.Blog">Comments</f:translate> |
| 46 | + </h3> |
| 47 | + <ol class="commentlist"> |
| 48 | + {comments -> f:format.raw()} |
| 49 | + </ol> |
| 50 | + <div class="clear"></div> |
| 51 | + </f:if> |
| 52 | + <h3> |
| 53 | + <f:translate package="RobertLemke.Plugin.Blog">Leave a reply</f:translate> |
| 54 | + </h3> |
| 55 | + <f:render partial="FormErrors" arguments="{for: 'newComment'}"/> |
| 56 | + <f:form action="create" controller="Comment" package="RobertLemke.Plugin.Blog" object="{newComment}" name="newComment" class="newcomment" id="newCommentForm"> |
| 57 | + <f:form.hidden name="postNode" value="{node.path}"/> |
| 58 | + <label for="comment.author"> |
| 59 | + <f:format.raw> |
| 60 | + <f:translate package="RobertLemke.Plugin.Blog">Name <span class="required">*</span></f:translate> |
| 61 | + </f:format.raw> |
| 62 | + </label> |
| 63 | + <f:form.textfield id="comment.author" property="author"/> |
| 64 | + <label for="comment.emailaddress"> |
| 65 | + <f:format.raw> |
| 66 | + <f:translate package="RobertLemke.Plugin.Blog">Email <span class="required">*</span> (won't be displayed)</f:translate> |
| 67 | + </f:format.raw> |
| 68 | + </label> |
| 69 | + <f:form.textfield id="comment.emailaddress" property="emailAddress"/> |
| 70 | + <f:form.textarea id="comment.text" property="text" rows="10" cols="50"/> |
| 71 | + <button class="secondary button">{f:translate(value: 'Submit', package: 'Neos.Flow')}</button> |
| 72 | + </f:form> |
| 73 | + </div> |
61 | 74 | </article>
|
0 commit comments