Skip to content

Commit

Permalink
link_to on multiple lines does not look good
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 25, 2018
1 parent 21db820 commit dfcd53a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
Expand Up @@ -6,8 +6,8 @@
% }
% else {
<li class="page-item">
<%= link_to $i => url_with->query([limit => $i])
=> (class => 'page-link') %>
% my $url = url_with->query([limit => $i]);
<a class="page-link" href="<%= $url %>"><%= $i %></a>
</li>
% }
% }
Expand Down
Expand Up @@ -14,9 +14,8 @@
% }
% else {
<li class="page-item">
<a class="page-link" href="<%= url_with->query([offset => 0]) %>">
First
</a>
% my $url = url_with->query([offset => 0]);
<a class="page-link" href="<%= $url %>">First</a>
% }
</li>
% if ($current_page == 1) {
Expand All @@ -25,10 +24,8 @@
% }
% else {
<li class="page-item">
<a class="page-link"
href="<%= url_with->query([offset => $prev_offset]) %>">
Previous
</a>
% my $url = url_with->query([offset => $prev_offset]);
<a class="page-link" href="<%= $url %>">Previous</a>
% }
</li>
% my $start = $current_page >= 3 ? $current_page - 2 : 1;
Expand All @@ -41,10 +38,8 @@
% }
% else {
<li class="page-item">
<a class="page-link"
href="<%= url_with->query([offset => ($i - 1) * $limit]) %>">
<%= $i %>
</a>
% my $url = url_with->query([offset => ($i - 1) * $limit]);
<a class="page-link" href="<%= $url %>"><%= $i %></a>
</li>
% }
% }
Expand All @@ -54,10 +49,8 @@
% }
% else {
<li class="page-item">
<a class="page-link"
href="<%= url_with->query([offset => $next_offset]) %>">
Next
</a>
% my $url = url_with->query([offset => $next_offset]);
<a class="page-link" href="<%= $url %>">Next</a>
% }
</li>
% if ($current_page >= $last_page) {
Expand All @@ -66,10 +59,8 @@
% }
% else {
<li class="page-item">
<a class="page-link"
href="<%= url_with->query([offset => $last_offset]) %>">
Last
</a>
% my $url = url_with->query([offset => $last_offset]);
<a class="page-link" href="<%= $url %>">Last</a>
% }
</li>
</ul>
Expand Down
Expand Up @@ -14,16 +14,16 @@
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
% if (@$parents) {
<%= link_to Parents => url_for('minion_jobs')->query(id => $parents)
=> (class => 'dropdown-item') %>
% my $url = url_for('minion_jobs')->query(id => $parents);
<a class="dropdown-item" href="<%= $url %>">Parents</a>
% }
% if (@$children) {
<%= link_to Children => url_for('minion_jobs')->query(id => $children)
=> (class => 'dropdown-item') %>
% my $url = url_for('minion_jobs')->query(id => $children);
<a class="dropdown-item" href="<%= $url %>">Children</a>
% }
% if ($id) {
<%= link_to Worker => url_for('minion_workers')->query(id => $id)
=> (class => 'dropdown-item') %>
% my $url = url_for('minion_workers')->query(id => $id);
<a class="dropdown-item" href="<%= $url %>">Worker</a>
% }
</div>
</div>
Expand Down

0 comments on commit dfcd53a

Please sign in to comment.