diff --git a/templates/main/form.html.ep b/templates/main/form.html.ep new file mode 100644 index 0000000..8804ee6 --- /dev/null +++ b/templates/main/form.html.ep @@ -0,0 +1,14 @@ +
+
+
+ <%= l('Name') %>: <%= text_field 'name', required => 1, placeholder => l('Name') %> + +
+ +
+
+ <%= submit_button l('Send') %> + +
+
+
diff --git a/templates/main/list.html.ep b/templates/main/list.html.ep index a060290..3ff28ad 100644 --- a/templates/main/list.html.ep +++ b/templates/main/list.html.ep @@ -1,14 +1,23 @@ % my $comments = stash('comments') || [];
-% foreach my $cm (@{ $comments }) { -
+
+<%= tag 'h4' => l('Comments') . ':' %> +% if (@{ $comments }) { +% foreach my $cm (@{ $comments }) { +
- <%= 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_date') => $cm->{date} %>, - <%= link_to 'Reply' => '#', class => 'reply', 'date-id' => $cm->{seq} %> + <%= link_to l('Reply') => '#', class => 'c_add', 'data-cid' => $cm->{seq} %>
<%= tag 'div' => (class => 'cmtd_text') => $cm->{text} %>
+% } + <%= link_to l('Add') => '#', class => 'c_add' %> +% } else { +

+ <%= l('No comments') %>. <%= link_to l('Add') => '#', class => 'c_add' %>? +

% }