kiddhustle
3 years ago
3 changed files with 55 additions and 64 deletions
@ -1,10 +0,0 @@ |
|||||||
.app-figure { |
|
||||||
margin: 0; |
|
||||||
} |
|
||||||
|
|
||||||
.app-figure__caption { |
|
||||||
@include govuk-font($size: 19); |
|
||||||
border-top: 1px solid $govuk-border-colour; |
|
||||||
margin-bottom: govuk-spacing(6); |
|
||||||
padding-top: govuk-spacing(4); |
|
||||||
} |
|
@ -1,57 +1,59 @@ |
|||||||
<table class="govuk-table"> |
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>"> |
||||||
<caption class="govuk-!-text-align-left govuk-!-margin-top-4 govuk-!-margin-bottom-4"> |
<table class="govuk-table"> |
||||||
<span class="govuk-!-margin-right-4"> |
<caption id="<%= title.dasherize %>" class="govuk-!-text-align-left govuk-!-margin-top-4 govuk-!-margin-bottom-4"> |
||||||
<strong><%= pagy.count %></strong> total <%= title.downcase %> |
<span class="govuk-!-margin-right-4"> |
||||||
</span> |
<strong><%= pagy.count %></strong> total <%= title.downcase %> |
||||||
<%= govuk_link_to "Download (CSV)", "/logs.csv", type: "text/csv" %> |
</span> |
||||||
</caption> |
<%= govuk_link_to "Download (CSV)", "/logs.csv", type: "text/csv" %> |
||||||
<thead class="govuk-table__head"> |
</caption> |
||||||
<tr class="govuk-table__row"> |
<thead class="govuk-table__head"> |
||||||
<th class="govuk-table__header" scope="col">Log</th> |
<tr class="govuk-table__row"> |
||||||
<th class="govuk-table__header" scope="col">Tenant</th> |
<th class="govuk-table__header" scope="col">Log</th> |
||||||
<th class="govuk-table__header" scope="col">Property</th> |
<th class="govuk-table__header" scope="col">Tenant</th> |
||||||
<th class="govuk-table__header" scope="col">Tenancy starts</th> |
<th class="govuk-table__header" scope="col">Property</th> |
||||||
<th class="govuk-table__header" scope="col">Log created</th> |
<th class="govuk-table__header" scope="col">Tenancy starts</th> |
||||||
<th class="govuk-table__header" scope="col">Completed</th> |
<th class="govuk-table__header" scope="col">Log created</th> |
||||||
<% if current_user.support? %> |
<th class="govuk-table__header" scope="col">Completed</th> |
||||||
<th class="govuk-table__header" scope="col">Owning organisation</th> |
<% if current_user.support? %> |
||||||
<th class="govuk-table__header" scope="col">Managing organisation</th> |
<th class="govuk-table__header" scope="col">Owning organisation</th> |
||||||
<% end %> |
<th class="govuk-table__header" scope="col">Managing organisation</th> |
||||||
</tr> |
<% end %> |
||||||
</thead> |
</tr> |
||||||
<tbody class="govuk-table__body"> |
</thead> |
||||||
<% case_logs.map do |log| %> |
<tbody class="govuk-table__body"> |
||||||
<tr class="govuk-table__row"> |
<% case_logs.map do |log| %> |
||||||
<th class="govuk-table__header" scope="row"> |
<tr class="govuk-table__row"> |
||||||
<%= govuk_link_to log.id, case_log_path(log) %> |
<th class="govuk-table__header" scope="row"> |
||||||
</th> |
<%= govuk_link_to log.id, case_log_path(log) %> |
||||||
<td class="govuk-table__cell app-!-font-tabular"> |
</th> |
||||||
<%= log.tenant_code? ? log.tenant_code : "–" %> |
<td class="govuk-table__cell app-!-font-tabular"> |
||||||
</td> |
<%= log.tenant_code? ? log.tenant_code : "–" %> |
||||||
<td class="govuk-table__cell app-!-font-tabular"> |
</td> |
||||||
<%= log.propcode? ? log.propcode : "–" %> |
<td class="govuk-table__cell app-!-font-tabular"> |
||||||
</td> |
<%= log.propcode? ? log.propcode : "–" %> |
||||||
<td class="govuk-table__cell"> |
</td> |
||||||
<%= log.startdate.present? ? log.startdate.to_formatted_s(:govuk_date) : "–" %> |
|
||||||
</td> |
|
||||||
<td class="govuk-table__cell"> |
|
||||||
<%= log.created_at.to_formatted_s(:govuk_date) %> |
|
||||||
</td> |
|
||||||
<td class="govuk-table__cell"> |
|
||||||
<%= govuk_tag( |
|
||||||
colour: log.status == "completed" ? "blue" : "grey", |
|
||||||
text: log.status.humanize, |
|
||||||
) %> |
|
||||||
</td> |
|
||||||
<% if current_user.support? %> |
|
||||||
<td class="govuk-table__cell"> |
<td class="govuk-table__cell"> |
||||||
<%= log.owning_organisation.name %> |
<%= log.startdate.present? ? log.startdate.to_formatted_s(:govuk_date) : "–" %> |
||||||
</td> |
</td> |
||||||
<td class="govuk-table__cell"> |
<td class="govuk-table__cell"> |
||||||
<%= log.managing_organisation.name %> |
<%= log.created_at.to_formatted_s(:govuk_date) %> |
||||||
</td> |
</td> |
||||||
|
<td class="govuk-table__cell"> |
||||||
|
<%= govuk_tag( |
||||||
|
colour: log.status == "completed" ? "blue" : "grey", |
||||||
|
text: log.status.humanize, |
||||||
|
) %> |
||||||
|
</td> |
||||||
|
<% if current_user.support? %> |
||||||
|
<td class="govuk-table__cell"> |
||||||
|
<%= log.owning_organisation.name %> |
||||||
|
</td> |
||||||
|
<td class="govuk-table__cell"> |
||||||
|
<%= log.managing_organisation.name %> |
||||||
|
</td> |
||||||
|
<% end %> |
||||||
|
</tr> |
||||||
<% end %> |
<% end %> |
||||||
</tr> |
</tbody> |
||||||
<% end %> |
</table> |
||||||
</tbody> |
</section> |
||||||
</table> |
|
||||||
|
Loading…
Reference in new issue