Added a lil link for plain/raw text
This commit is contained in:
parent
65d9ec84e5
commit
b548b209e3
|
@ -61,7 +61,7 @@ tests locally:
|
||||||
|
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
1. Probably gotta add a link to the 'raw' txt view somewhere
|
1. CAPTCHA
|
||||||
1. "All new posts flagged" mode (require approval for new posts)
|
1. "All new posts flagged" mode (require approval for new posts)
|
||||||
1. Tests for mod-only user?
|
1. Tests for mod-only user?
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@ my %invalid_remark = (
|
||||||
subtest 'View single remark', sub {
|
subtest 'View single remark', sub {
|
||||||
$t->get_ok('/remark/single/1')->status_is(200)
|
$t->get_ok('/remark/single/1')->status_is(200)
|
||||||
->text_like(h2 => qr/Remark #1/)
|
->text_like(h2 => qr/Remark #1/)
|
||||||
->element_exists('a[href$="/remark/post/1/1"]');
|
->element_exists('a[href$="/remark/post/1/1"]')
|
||||||
|
->element_exists('h2 sup a[href$=".txt"]');
|
||||||
$t->get_ok('/remark/single/65536')->status_is(404)
|
$t->get_ok('/remark/single/65536')->status_is(404)
|
||||||
->text_like(p => qr/Remark not found/);
|
->text_like(p => qr/Remark not found/);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@ subtest 'List threads by page', sub {
|
||||||
|
|
||||||
subtest 'View single thread', sub {
|
subtest 'View single thread', sub {
|
||||||
$t->get_ok('/thread/single/1')->status_is(200)
|
$t->get_ok('/thread/single/1')->status_is(200)
|
||||||
->text_like(h2 => qr/Thread #1/);
|
->text_like(h2 => qr/Thread #1/)
|
||||||
|
->element_exists('h2 sup a[href$=".txt"]');
|
||||||
$t->get_ok('/thread/single/65536')->status_is(404)
|
$t->get_ok('/thread/single/65536')->status_is(404)
|
||||||
->text_like(p => qr/Thread not found/);
|
->text_like(p => qr/Thread not found/);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
% layout 'default';
|
% layout 'default';
|
||||||
% title my $remark_id = $remark->{'id'} ? "Remark #$remark_id" : '?';
|
% title my $remark_id = $remark->{'id'} ? "Remark #$remark_id" : '?';
|
||||||
<h2 class="page-title"><%= title %></h2>
|
<h2 class="page-title">
|
||||||
|
<%= title %> <sup><%= link_to txt => url_for . '.txt' %></sup>
|
||||||
|
</h2>
|
||||||
<% if (keys %{$remark}) { =%>
|
<% if (keys %{$remark}) { =%>
|
||||||
<% content_for open_graph => begin %>
|
<% content_for open_graph => begin %>
|
||||||
<meta property="og:type" content="article">
|
<meta property="og:type" content="article">
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
% layout 'default';
|
% layout 'default';
|
||||||
% title my $thread_id = $thread->{'id'} ? "Thread #$thread_id" : '?';
|
% title my $thread_id = $thread->{'id'} ? "Thread #$thread_id" : '?';
|
||||||
<h2 class="page-title"><%= title %></h2>
|
<h2 class="page-title">
|
||||||
|
<%= title %> <sup><%= link_to txt => url_for . '.txt' %></sup>
|
||||||
|
</h2>
|
||||||
<% if (keys %{$thread}) { =%>
|
<% if (keys %{$thread}) { =%>
|
||||||
<% content_for open_graph => begin %>
|
<% content_for open_graph => begin %>
|
||||||
<meta property="og:type" content="article">
|
<meta property="og:type" content="article">
|
||||||
|
|
Loading…
Reference in a new issue