Alex 'AdUser' Z
7 years ago
2 changed files with 27 additions and 4 deletions
@ -0,0 +1,14 @@ |
|||||||
|
<div id="cmtd_add"> |
||||||
|
<form method="POST" action=""> |
||||||
|
<div class="cmtd_head"> |
||||||
|
<%= l('Name') %>: <%= text_field 'name', required => 1, placeholder => l('Name') %> |
||||||
|
<input type="hidden" name="reply" value=""> |
||||||
|
</div> |
||||||
|
<textarea name="text" required=1></textarea> |
||||||
|
<div id="cmtd_captcha"></div> |
||||||
|
<div class="cmtd_add"> |
||||||
|
<%= submit_button l('Send') %> |
||||||
|
<span id="resp"></span> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> |
@ -1,14 +1,23 @@ |
|||||||
% my $comments = stash('comments') || []; |
% my $comments = stash('comments') || []; |
||||||
<div id="cmtd_main"> |
<div id="cmtd_main"> |
||||||
|
<hr> |
||||||
|
<%= tag 'h4' => l('Comments') . ':' %> |
||||||
|
% if (@{ $comments }) { |
||||||
% foreach my $cm (@{ $comments }) { |
% foreach my $cm (@{ $comments }) { |
||||||
<div id="cmtd_comment"> |
<div class="cmtd_comment"> |
||||||
<div class="cmtd_head"> |
<div class="cmtd_head"> |
||||||
<%= tag span => (class => 'cmtd_num') => $cm->{seq} %>, |
<%= tag a => (class => 'cmtd_num', name => "cm$cm->{seq}") => "# $cm->{seq}" %>, |
||||||
<%= tag span => (class => 'cmtd_name') => $cm->{name} %>, |
<%= tag span => (class => 'cmtd_name') => $cm->{name} %>, |
||||||
<%= tag span => (class => 'cmtd_date') => $cm->{date} %>, |
<%= tag span => (class => 'cmtd_date') => $cm->{date} %>, |
||||||
<%= link_to 'Reply' => '#', class => 'reply', 'date-id' => $cm->{seq} %> |
<%= link_to l('Reply') => '#', class => 'c_add', 'data-cid' => $cm->{seq} %> |
||||||
</div> |
</div> |
||||||
<%= tag 'div' => (class => 'cmtd_text') => $cm->{text} %> |
<%= tag 'div' => (class => 'cmtd_text') => $cm->{text} %> |
||||||
</div> |
</div> |
||||||
|
% } |
||||||
|
<span id="comment_add"><%= link_to l('Add') => '#', class => 'c_add' %></span> |
||||||
|
% } else { |
||||||
|
<p id="no_comments_notice"> |
||||||
|
<%= l('No comments') %>. <%= link_to l('Add') => '#', class => 'c_add' %>? |
||||||
|
</p> |
||||||
% } |
% } |
||||||
</div> |
</div> |
||||||
|
Loading…
Reference in new issue