Skip to content

Commit

Permalink
Merge pull request #144 from slovensko-digital/RF-458/published-at
Browse files Browse the repository at this point in the history
RF-458 Move published date to a better place in detail
  • Loading branch information
celuchmarek authored Oct 30, 2023
2 parents d0a74e6 + a029baf commit c6c8e48
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/pages/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<% end %>
<span class="badge text-dark"><%= page.revisions.size %></span>
</td>
<td><%= l [page.updated_at, page.latest_revision.updated_at].max, format: '%F %T' %></td>
<td><%= l page.updated_at, format: '%F %T' %></td>
<td>
<% if page.publishable? %>
<% if page.published? %>
Expand Down
30 changes: 17 additions & 13 deletions app/views/projects/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@
<% end %>

<div class="row mb-4 mt-5 pt-4">
<div class="col">
<h5>Hodnotenie zverejnené dňa</h5>
<p><%= l(@project.updated_at.to_date, format: :human) %></p>
<% if @project.outdated? %>
<div class="alert alert-warning my-2" role="alert">
<h5 class="alert-heading">Hodnotenie nie je aktuálne</h5>
<p class="mb-0">
V tomto projekte nastali zmeny, ktoré nie sú zahrnuté v súčasnom hodnotení. Na aktualizácii pracujeme, môžete sa do nej
<%= link_to 'zapojiť aj Vy', "https://platforma.slovensko.digital/t/#{@project.project_id}", title: 'Upraviť hodnotenie', class: 'alert-link' %>.
</p>
</div>
<% end %>
</div>
</div>

<div class="row mb-4">
<div class="col">
<h5>Aktuálny stav projektu</h5>
<p><%= @project.stage %></p>
Expand All @@ -68,19 +84,7 @@
</div>
</div>
<hr class="mt-0 mb-2">
<p class="text-right mb-5 mt-1">
Posledná aktualizácia: <strong><%= l(@project.updated_at.to_date, format: :human) %></strong></strong>
</p>
<% if @project.outdated? %>
<div class="alert alert-warning my-2" role="alert">
<h5 class="alert-heading">Hodnotenie nie je aktuálne</h5>
<p class="mb-0">
V tomto projekte nastali zmeny, ktoré nie sú zahrnuté v súčasnom hodnotení. Na aktualizácii pracujeme, môžete sa do nej
<%= link_to 'zapojiť aj Vy', "https://platforma.slovensko.digital/t/#{@project.project_id}", title: 'Upraviť hodnotenie', class: 'alert-link' %>.
</p>
</div>
<% end %>
<div class="row">
<div class="row mt-5">
<% @project.ratings.index_by(&:rating_type).each do |rating_type, rating| %>
<div class="col-md-3">
<%= rating_stars(rating) %>
Expand Down

0 comments on commit c6c8e48

Please sign in to comment.