s/view/list/g
This commit is contained in:
parent
8a99330eeb
commit
6ee158a89e
14
PostText.pl
14
PostText.pl
|
@ -38,15 +38,15 @@ under sub ($c) {
|
|||
};
|
||||
|
||||
# Root
|
||||
get '/', sub ($c) { $c->redirect_to('view') };
|
||||
get '/', sub ($c) { $c->redirect_to('list') };
|
||||
|
||||
# View
|
||||
# List
|
||||
group {
|
||||
under 'view';
|
||||
under 'list';
|
||||
|
||||
get '/:view_page', [view_page => qr/[0-9]+/], {view_page => 1}, sub ($c) {
|
||||
my $base_path = $c->match->path_for(view_page => undef)->{'path'};
|
||||
my $this_page = $c->param('view_page');
|
||||
get '/:list_page', [list_page => qr/[0-9]+/], {list_page => 1}, sub ($c) {
|
||||
my $base_path = $c->match->path_for(list_page => undef)->{'path'};
|
||||
my $this_page = $c->param('list_page');
|
||||
my $last_page = $c->thread->get_last_page();
|
||||
my $threads = $c->thread->get_threads_by_page($this_page);
|
||||
|
||||
|
@ -87,7 +87,7 @@ group {
|
|||
$thread_body
|
||||
);
|
||||
|
||||
return $c->redirect_to('view');
|
||||
return $c->redirect_to('list');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,8 @@ Run the tests locally (against development environment)
|
|||
|
||||
## TODOs
|
||||
|
||||
1. Is there something I can do about route names?
|
||||
1. Tests for remark form
|
||||
1. Fix tests broken when 'view' was switched to 'list'
|
||||
1. Return the last remark with remark form
|
||||
1. Marked some items for clean up with comments
|
||||
1. Method names may need to be shortened
|
||||
1. Change 'view' to something like 'list' or 'browse'
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
<h1>Post::Text</h1>
|
||||
<nav>
|
||||
<%= link_to View => 'view' %>
|
||||
<%= link_to List => 'list' %>
|
||||
<%= link_to New => 'post' %>
|
||||
</nav>
|
||||
<hr>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
% layout 'main';
|
||||
% title 'View Threads';
|
||||
% title 'Threads List';
|
||||
<h2><%= title %></h2>
|
||||
<div class="threads">
|
||||
<% for my $thread (@$threads) { =%>
|
|
@ -1,5 +1,5 @@
|
|||
% layout 'main';
|
||||
% title "View Thread - #$thread->{'id'}";
|
||||
% title "Thread - #$thread->{'id'}";
|
||||
<h2><%= title %></h2>
|
||||
<div class="threads">
|
||||
<article class="thread">
|
||||
|
|
Loading…
Reference in New Issue
Block a user