From c0c23e270bbc70d647c7f713814cec42a1924694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Salvador=20P=C3=A9rez=20Garc=C3=ADa?= Date: Thu, 12 Jul 2018 12:00:59 +0200 Subject: [PATCH] Fixes #214 redesign how proposed actions are shown in progress view inside the proposal's dashboard --- app/views/proposals_dashboard/_document.html.erb | 10 ++++++++++ .../proposals_dashboard/_proposed_action.html.erb | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 app/views/proposals_dashboard/_document.html.erb diff --git a/app/views/proposals_dashboard/_document.html.erb b/app/views/proposals_dashboard/_document.html.erb new file mode 100644 index 000000000..c5b688575 --- /dev/null +++ b/app/views/proposals_dashboard/_document.html.erb @@ -0,0 +1,10 @@ +

+ <%= link_to document.attachment.url, target: '_blank' do %> + <%= document.title %> + ( + <%= document.humanized_content_type %> +  |  + <%= number_to_human_size(document.attachment_file_size, precision: 2) %> + ) + <% end %> +

diff --git a/app/views/proposals_dashboard/_proposed_action.html.erb b/app/views/proposals_dashboard/_proposed_action.html.erb index a82cd2a09..3dc82f1f8 100644 --- a/app/views/proposals_dashboard/_proposed_action.html.erb +++ b/app/views/proposals_dashboard/_proposed_action.html.erb @@ -21,8 +21,10 @@ <% end %> <% proposed_action.links.each do |link| %> - <%= link_to link.label, link.url, target: '_blank' %> +

<%= link_to link.label, link.url, target: '_blank' %>

<% end %> + + <%= render partial: 'document', collection: proposed_action.documents %> <% end %>