From 62d70163ed30a309ce8d8616532f322183cf7a53 Mon Sep 17 00:00:00 2001 From: Earlopain Date: Sat, 30 Oct 2021 12:00:38 +0200 Subject: [PATCH 1/2] [Tickets] Fix layout on index page --- app/views/tickets/index.html.erb | 100 +++++++++++++++---------------- 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/app/views/tickets/index.html.erb b/app/views/tickets/index.html.erb index 06e515298..ec62f58eb 100644 --- a/app/views/tickets/index.html.erb +++ b/app/views/tickets/index.html.erb @@ -1,62 +1,58 @@
+ <%= render partial: 'search' %> -
-
- -<%= render partial: 'search' %> - -

Ticket Center

- - - - - <% if CurrentUser.is_admin? %> - - - <% end %> - - - - - - - - - - <% @tickets.each do |ticket| %> - - - <% if CurrentUser.is_admin? %> - - + <% else %> + + <% end %> -
- <%= numbered_paginator(@tickets) %> +
+ + + + <% end %> + +
IDReporterClaimed ByTypeSubjectStatusUpdatedCreated
<%= link_to ticket.id, ticket_path(ticket) %> - <%= link_to_user ticket.creator %> - - <% if ticket.claimant.nil? %> - Unclaimed - <% else %> - <%= link_to_user ticket.claimant %> +

Ticket Center

+ + + + + <% if CurrentUser.is_admin? %> + + <% end %> - - <% end %> - + + + + + + + - <% if !ticket.can_see_reason?(CurrentUser.user) %> - - <% else %> - - <% end %> + + <% @tickets.each do |ticket| %> + + + <% if CurrentUser.is_admin? %> + + + <% end %> + - - - - - <% end %> - -
IDReporterClaimed By<%= link_to ticket.type_title, ticket_path(ticket) %>TypeSubjectStatusUpdatedCreated
Confidential<%= link_to h(strip_dtext(truncate(ticket.subject, length: 200))), action: "show", id: ticket.id %>
<%= link_to ticket.id, ticket_path(ticket) %><%= link_to_user ticket.creator %> + <% if ticket.claimant.nil? %> + Unclaimed + <% else %> + <%= link_to_user ticket.claimant %> + <% end %> + <%= link_to ticket.type_title, ticket_path(ticket) %><%= pretty_ticket_status(ticket) %>"><%= time_ago_in_words(ticket.updated_at) %> ago"><%= time_ago_in_words(ticket.created_at) %> ago
+ <% if !ticket.can_see_reason?(CurrentUser.user) %> +
Confidential<%= link_to h(strip_dtext(truncate(ticket.subject, length: 200))), action: "show", id: ticket.id %><%= pretty_ticket_status(ticket) %>"><%= time_ago_in_words(ticket.updated_at) %> ago"><%= time_ago_in_words(ticket.created_at) %> ago
+ +
+ <%= numbered_paginator(@tickets) %> +
+ <% render partial: 'secondary_links' %> From 25ee68658fae7223e59d20f58970694e2f4906ca Mon Sep 17 00:00:00 2001 From: Earlopain Date: Sat, 30 Oct 2021 12:23:11 +0200 Subject: [PATCH 2/2] [Tickets] Make the whole subject cell clickable --- app/javascript/src/styles/common/tables.scss | 10 ++++++++++ app/views/tickets/index.html.erb | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/javascript/src/styles/common/tables.scss b/app/javascript/src/styles/common/tables.scss index f3c937eee..7ddd6f836 100644 --- a/app/javascript/src/styles/common/tables.scss +++ b/app/javascript/src/styles/common/tables.scss @@ -13,6 +13,16 @@ table.table { tr { td { padding: $padding-050 $padding-025; + + &.full-width-link { + padding: 0; + + > a { + width: 100%; + display: inline-block; + padding: $padding-050 $padding-025; + } + } } @include themable { background-color: themed("color-section"); diff --git a/app/views/tickets/index.html.erb b/app/views/tickets/index.html.erb index ec62f58eb..5ac02ffd1 100644 --- a/app/views/tickets/index.html.erb +++ b/app/views/tickets/index.html.erb @@ -38,7 +38,7 @@ <% if !ticket.can_see_reason?(CurrentUser.user) %> Confidential <% else %> - <%= link_to h(strip_dtext(truncate(ticket.subject, length: 200))), action: "show", id: ticket.id %> + <%= link_to h(strip_dtext(truncate(ticket.subject, length: 200))), action: "show", id: ticket.id %> <% end %> <%= pretty_ticket_status(ticket) %>