Merge pull request #342 from zwagoth/tickets-link-height

Increase the clickable area on the ticket subject
This commit is contained in:
Zwagoth 2021-10-30 17:41:16 -04:00 committed by GitHub
commit 06f39cdc78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 52 deletions

View File

@ -13,6 +13,16 @@ table.table {
tr { tr {
td { td {
padding: $padding-050 $padding-025; padding: $padding-050 $padding-025;
&.full-width-link {
padding: 0;
> a {
width: 100%;
display: inline-block;
padding: $padding-050 $padding-025;
}
}
} }
@include themable { @include themable {
background-color: themed("color-section"); background-color: themed("color-section");

View File

@ -1,62 +1,58 @@
<div id="c-tickets"> <div id="c-tickets">
<div id="a-index"> <div id="a-index">
<%= render partial: 'search' %>
</div> <h2>Ticket Center</h2>
</div> <table class="valign striped">
<thead>
<%= render partial: 'search' %> <tr>
<th style="width:5%">ID</th>
<h2>Ticket Center</h2> <% if CurrentUser.is_admin? %>
<table class="valign striped"> <th style="width:10%">Reporter</th>
<thead> <th style="width:10%">Claimed By</th>
<tr>
<th style="width:5%">ID</th>
<% if CurrentUser.is_admin? %>
<th style="width:10%">Reporter</th>
<th style="width:10%">Claimed By</th>
<% end %>
<th style="width:15%">Type</th>
<th style="width:25%">Subject</th>
<th style="width:8%">Status</th>
<th style="width:10%">Updated</th>
<th style="width:18%">Created</th>
</tr>
</thead>
<tbody>
<% @tickets.each do |ticket| %>
<tr data-link="<%= ticket_path(ticket) %>">
<td><%= link_to ticket.id, ticket_path(ticket) %></td>
<% if CurrentUser.is_admin? %>
<td>
<%= link_to_user ticket.creator %>
</td>
<td>
<% if ticket.claimant.nil? %>
<span class="redtext">Unclaimed</span>
<% else %>
<%= link_to_user ticket.claimant %>
<% end %> <% end %>
</td> <th style="width:15%">Type</th>
<% end %> <th style="width:25%">Subject</th>
<td><%= link_to ticket.type_title, ticket_path(ticket) %></td> <th style="width:8%">Status</th>
<th style="width:10%">Updated</th>
<th style="width:18%">Created</th>
</tr>
</thead>
<% if !ticket.can_see_reason?(CurrentUser.user) %> <tbody>
<td><span style="cursor:help;" class="redtext" title="Due to privacy concerns, this information is confidential">Confidential</span></td> <% @tickets.each do |ticket| %>
<% else %> <tr data-link="<%= ticket_path(ticket) %>">
<td class="ticket-subject" title="<%= h(truncate(strip_dtext(ticket.reason), length: 200)) %>"><%= link_to h(strip_dtext(truncate(ticket.subject, length: 200))), action: "show", id: ticket.id %></td> <td><%= link_to ticket.id, ticket_path(ticket) %></td>
<% end %> <% if CurrentUser.is_admin? %>
<td><%= link_to_user ticket.creator %></td>
<td>
<% if ticket.claimant.nil? %>
<span class="redtext">Unclaimed</span>
<% else %>
<%= link_to_user ticket.claimant %>
<% end %>
</td>
<% end %>
<td><%= link_to ticket.type_title, ticket_path(ticket) %></td>
<td class="<%= ticket.status %>-ticket"><%= pretty_ticket_status(ticket) %></td> <% if !ticket.can_see_reason?(CurrentUser.user) %>
<td style="cursor:help;" title="<%= ticket.updated_at.strftime("%b %d, %Y %I:%M %p") %>"><%= time_ago_in_words(ticket.updated_at) %> ago</td> <td><span style="cursor:help;" class="redtext" title="Due to privacy concerns, this information is confidential">Confidential</span></td>
<td style="cursor:help;" title="<%= ticket.created_at.strftime("%b %d, %Y %I:%M %p") %>"><%= time_ago_in_words(ticket.created_at) %> ago</td> <% else %>
</tr> <td class="ticket-subject full-width-link" title="<%= h(truncate(strip_dtext(ticket.reason), length: 200)) %>"><%= link_to h(strip_dtext(truncate(ticket.subject, length: 200))), action: "show", id: ticket.id %></td>
<% end %> <% end %>
</tbody>
</table>
<div id="paginator"> <td class="<%= ticket.status %>-ticket"><%= pretty_ticket_status(ticket) %></td>
<%= numbered_paginator(@tickets) %> <td style="cursor:help;" title="<%= ticket.updated_at.strftime("%b %d, %Y %I:%M %p") %>"><%= time_ago_in_words(ticket.updated_at) %> ago</td>
<td style="cursor:help;" title="<%= ticket.created_at.strftime("%b %d, %Y %I:%M %p") %>"><%= time_ago_in_words(ticket.created_at) %> ago</td>
</tr>
<% end %>
</tbody>
</table>
<div id="paginator">
<%= numbered_paginator(@tickets) %>
</div>
</div>
</div> </div>
<% render partial: 'secondary_links' %> <% render partial: 'secondary_links' %>