Implements #186
Progress view shows the actions according to the mockups.
This commit is contained in:
@@ -294,4 +294,41 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.proposed-action {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
margin-bottom: 15pt;
|
||||
|
||||
.exec-indicator {
|
||||
margin-right: 10pt;
|
||||
|
||||
i {
|
||||
color: #00e193;
|
||||
}
|
||||
|
||||
.checkbox-unchecked {
|
||||
display:block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid lightgray;
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #535469;
|
||||
line-height: 1rem;
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,29 @@
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to new_request_proposal_dashboard_path(proposal, action) do %>
|
||||
<span data-tooltip title="<%= action.short_description || action.title %>">
|
||||
<%= action.title %>
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<% if action.proposals.where(id: proposal.id).any? %>
|
||||
<%=l action.proposal_executed_dashboard_actions.find_by(proposal: proposal).executed_at, format: :short %>
|
||||
<% else %>
|
||||
<%= link_to t('.execute'),
|
||||
execute_proposal_dashboard_path(proposal, action),
|
||||
method: 'post' %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<div class="row" id="<%= dom_id(proposed_action) %>">
|
||||
<div class="proposed-action">
|
||||
<div class="exec-indicator">
|
||||
<% if proposed_action.proposals.where(id: proposal.id).any? %>
|
||||
<i class="fi-check success"></i>
|
||||
<% else %>
|
||||
<%= link_to execute_proposal_dashboard_path(proposal, proposed_action), method: :post, id: "#{dom_id(proposed_action)}_execute" do %>
|
||||
<div class="checkbox-unchecked">
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><%= proposed_action.title %></h4>
|
||||
<% if proposed_action.proposals.where(id: proposal.id).any? %>
|
||||
<p><%=l(proposed_action.proposal_executed_dashboard_actions.find_by(proposal: proposal).executed_at.to_date) %></p>
|
||||
<% else %>
|
||||
<% unless proposed_action.short_description.blank? %>
|
||||
<p><%= proposed_action.short_description %></p>
|
||||
<% end %>
|
||||
|
||||
<% proposed_action.links.each do |link| %>
|
||||
<%= link_to link.label, link.url, target: '_blank' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<% if proposed_actions.any? %>
|
||||
<br><br>
|
||||
<div class="action-title">
|
||||
<h5><%= t('.title') %></h5>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<%= render partial: 'proposed_action', collection: proposed_actions %>
|
||||
<% end %>
|
||||
@@ -1,4 +1,5 @@
|
||||
<% if active_resources.any? %>
|
||||
<br><br>
|
||||
<div class="action-title">
|
||||
<h5><%= t('.available_resources') %></h5>
|
||||
<hr>
|
||||
|
||||
@@ -21,11 +21,5 @@
|
||||
|
||||
<%= javascript_include_tag 'dashboard_graphs', 'data-turbolinks-track' => true %>
|
||||
|
||||
<table>
|
||||
<caption><%= t('proposals_dashboard.menu.actions') %></caption>
|
||||
<% proposed_actions.each do |action| %>
|
||||
<%= render partial: 'proposed_action', locals: { action: action } %>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= render 'recommended_actions' %>
|
||||
<%= render 'resources' %>
|
||||
|
||||
@@ -508,10 +508,7 @@ en:
|
||||
my_proposal: My proposal
|
||||
progress: Progress
|
||||
resources: Resources
|
||||
actions: Actions
|
||||
polls: Polls
|
||||
proposed_action:
|
||||
execute: Execute
|
||||
form:
|
||||
request: Request
|
||||
create_request:
|
||||
@@ -539,6 +536,8 @@ en:
|
||||
required_supports: "%{supports} supports required"
|
||||
and: and
|
||||
view_resource: See resource
|
||||
recommended_actions:
|
||||
title: Recommended actions
|
||||
dashboard:
|
||||
polls:
|
||||
index:
|
||||
|
||||
@@ -508,15 +508,12 @@ es:
|
||||
my_proposal: Mi propuesta
|
||||
progress: Progreso
|
||||
resources: Recursos
|
||||
actions: Acciones
|
||||
polls: Encuestas
|
||||
proposed_action:
|
||||
execute: Ejecutar
|
||||
form:
|
||||
request: Solicitar
|
||||
create_request:
|
||||
success: La petición ha sido correctamente enviada al administrador.
|
||||
stats:
|
||||
progress:
|
||||
title: Gráfico
|
||||
group_by_year: Agrupar por año
|
||||
group_by_month: Agrupar por meses
|
||||
@@ -539,6 +536,8 @@ es:
|
||||
required_supports: "%{supports} apoyos necesarios"
|
||||
and: y
|
||||
view_resource: Ver recurso
|
||||
recommended_actions:
|
||||
title: Acciones recomendadas
|
||||
dashboard:
|
||||
polls:
|
||||
index:
|
||||
|
||||
Reference in New Issue
Block a user