Various tweaks
This commit is contained in:
parent
846eaac58d
commit
279c1cd47d
|
@ -7,3 +7,7 @@
|
||||||
border-style: dotted;
|
border-style: dotted;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thread .id, .remark .id {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
<div class="threads">
|
<div class="threads">
|
||||||
<% for my $thread (@{$threads}) { =%>
|
<% for my $thread (@{$threads}) { =%>
|
||||||
<article class="thread">
|
<article class="thread">
|
||||||
<span class="id">
|
<nav class="id">
|
||||||
<%= link_to "#$thread->{'id'}",
|
<%= link_to "#$thread->{'id'}",
|
||||||
thread_page => {thread_id => $thread->{'id'}} %>
|
thread_page => {thread_id => $thread->{'id'}} %>
|
||||||
</span>
|
</nav>
|
||||||
<h3 class="title"><%= $thread->{'title'} %></h3>
|
<h3 class="title"><%= $thread->{'title'} %></h3>
|
||||||
<h4 class="date"><%= $thread->{'date'} %></h4>
|
<h4 class="date"><%= $thread->{'date'} %></h4>
|
||||||
<h5 class="author"><%= $thread->{'author'} %></h5>
|
<h5 class="author"><%= $thread->{'author'} %></h5>
|
||||||
<p class="body"><%= $thread->{'body'} %></p>
|
<p class="body"><%= $thread->{'body'} %></p>
|
||||||
<span class="remarks">
|
<nav class="remarks">
|
||||||
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
|
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
|
||||||
<%= link_to thread_page => {thread_id => $thread->{'id'}}, begin %>
|
<%= link_to thread_page => {thread_id => $thread->{'id'}}, begin %>
|
||||||
(<%= $thread->{'remark_count'} %> remarks)
|
(<%= $thread->{'remark_count'} %> remarks)
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</nav>
|
||||||
</article>
|
</article>
|
||||||
<% } =%>
|
<% } =%>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="title field">
|
<div class="title field">
|
||||||
<%= label_for title => 'Title' %>
|
<%= label_for title => 'Title' %>
|
||||||
<%= text_field 'title', maxlength => 127, minlength => 1 %>
|
<%= text_field title => (
|
||||||
|
maxlength => 127,
|
||||||
|
minlength => 1,
|
||||||
|
autofocus => 'autofocus'
|
||||||
|
) %>
|
||||||
<% if (my $error = validation->error('title')) { =%>
|
<% if (my $error = validation->error('title')) { =%>
|
||||||
<p class="field-with-error">Invalid title: 1 to 127 characters please.</p>
|
<p class="field-with-error">Invalid title: 1 to 127 characters please.</p>
|
||||||
<% } =%>
|
<% } =%>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<h2><%= title %></h2>
|
<h2><%= title %></h2>
|
||||||
<div class="remarks">
|
<div class="remarks">
|
||||||
<article class="remark">
|
<article class="remark">
|
||||||
<span class="id">#<%= $remark->{'id'} %></span>
|
<nav class="id">#<%= $remark->{'id'} %></nav>
|
||||||
<h4 class="date"><%= $remark->{'date'} %></h4>
|
<h4 class="date"><%= $remark->{'date'} %></h4>
|
||||||
<h5 class="author"><%= $remark->{'author'} %></h5>
|
<h5 class="author"><%= $remark->{'author'} %></h5>
|
||||||
<p class="body"><%= $remark->{'body'} %></p>
|
<p class="body"><%= $remark->{'body'} %></p>
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
maxlength => 4000,
|
maxlength => 4000,
|
||||||
minlength => 2,
|
minlength => 2,
|
||||||
required => 'true',
|
required => 'true',
|
||||||
rows => 6
|
rows => 6,
|
||||||
|
autofocus => 'autofocus'
|
||||||
) %>
|
) %>
|
||||||
<% if (my $error = validation->error('body')) { =%>
|
<% if (my $error = validation->error('body')) { =%>
|
||||||
<p class="field-with-error">Invalid text: Up to 4,000 characters only.</p>
|
<p class="field-with-error">Invalid text: Up to 4,000 characters only.</p>
|
||||||
|
@ -30,10 +31,10 @@
|
||||||
<div class="threads">
|
<div class="threads">
|
||||||
<h3>Thread</h3>
|
<h3>Thread</h3>
|
||||||
<article class="thread">
|
<article class="thread">
|
||||||
<span class="id">
|
<nav class="id">
|
||||||
<%= link_to "#$thread->{'id'}",
|
<%= link_to "#$thread->{'id'}",
|
||||||
thread_page => {thread_id => $thread->{'id'}} %>
|
thread_page => {thread_id => $thread->{'id'}} %>
|
||||||
</span>
|
</nav>
|
||||||
<h3 class="title"><%= $thread->{'title'} %></h3>
|
<h3 class="title"><%= $thread->{'title'} %></h3>
|
||||||
<h4 class="date"><%= $thread->{'date'} %></h4>
|
<h4 class="date"><%= $thread->{'date'} %></h4>
|
||||||
<h5 class="author"><%= $thread->{'author'} %></h5>
|
<h5 class="author"><%= $thread->{'author'} %></h5>
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
<div class="remarks">
|
<div class="remarks">
|
||||||
<h3>Last Remark</h3>
|
<h3>Last Remark</h3>
|
||||||
<article class="remark">
|
<article class="remark">
|
||||||
<span class="id">#<%= $last_remark_id %></span>
|
<nav class="id">#<%= $last_remark_id %></nav>
|
||||||
<h4 class="date"><%= $last_remark->{'date'} %></h4>
|
<h4 class="date"><%= $last_remark->{'date'} %></h4>
|
||||||
<h5 class="author"><%= $last_remark->{'author'} %></h5>
|
<h5 class="author"><%= $last_remark->{'author'} %></h5>
|
||||||
<p class="body"><%= $last_remark->{'body'} %></p>
|
<p class="body"><%= $last_remark->{'body'} %></p>
|
||||||
|
|
|
@ -17,16 +17,19 @@
|
||||||
<h3>Remarks</h3>
|
<h3>Remarks</h3>
|
||||||
<% for my $remark (@{$remarks}) { =%>
|
<% for my $remark (@{$remarks}) { =%>
|
||||||
<article class="remark">
|
<article class="remark">
|
||||||
<span class="id">
|
<nav class="id">
|
||||||
<%= link_to "#$remark->{'id'}",
|
<%= link_to "#$remark->{'id'}",
|
||||||
remark_id => {remark_id => $remark->{'id'}} %>
|
remark_id => {remark_id => $remark->{'id'}} %>
|
||||||
</span>
|
</nav>
|
||||||
<h4 class="date"><%= $remark->{'date'} %></h4>
|
<h4 class="date"><%= $remark->{'date'} %></h4>
|
||||||
<h5 class="author"><%= $remark->{'author'} %></h5>
|
<h5 class="author"><%= $remark->{'author'} %></h5>
|
||||||
<p class="body"><%= $remark->{'body'} %></p>
|
<p class="body"><%= $remark->{'body'} %></p>
|
||||||
</article>
|
</article>
|
||||||
<% } =%>
|
<% } =%>
|
||||||
</div>
|
</div>
|
||||||
|
<nav>
|
||||||
|
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
|
||||||
|
</nav>
|
||||||
<nav>
|
<nav>
|
||||||
<% if ($last_page && $last_page != 1) { =%>
|
<% if ($last_page && $last_page != 1) { =%>
|
||||||
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
|
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user