diff --git a/lib/PostText.pm b/lib/PostText.pm index fa47d78..05fb4ae 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -110,6 +110,13 @@ sub startup($self) { # Root redirect $r->get('/', sub ($c) { $c->redirect_to('threads_list') }); + # Shortcut to new session cookie/identity + $r->get('/new', sub ($c) { + $c->session(expires => 1); + + $c->redirect_to('threads_list'); + }); + # Static pages $r->get('/about')->to('page#about')->name('about_page'); diff --git a/templates/remark/create.html.ep b/templates/remark/create.html.ep index 33c2044..df4bd33 100644 --- a/templates/remark/create.html.ep +++ b/templates/remark/create.html.ep @@ -34,13 +34,11 @@

Thread

- <%= link_to single_thread => {thread_id => $thread->{'id'}}, begin %> + <%= $thread->{'title'} %> - <% end %> - - <%= link_to "#$thread->{'id'}", - single_thread => {thread_id => $thread->{'id'}} %> + <%= link_to "#$thread->{'id'}", single_thread => + {thread_id => $thread->{'id'}}, (class => 'post__id') %>

<%= $thread->{'date'} %>

<%= $thread->{'author'} %>
@@ -54,8 +52,9 @@

Last Remark

- <%= link_to $last_remark->{'date'}, single_remark => - {remark_id => $last_remark_id} %> + + <%= $last_remark->{'date'} %> + <%= link_to "#$last_remark_id", single_remark => {remark_id => $last_remark_id}, (class => 'post__id') %>