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