OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/scenarios/_index.html.erb

61 lines
2.0 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details.
++#%>
<%#
Used from app/views/projects/settings/_timelines.html.erb
%>
<h3><%= Scenario.model_name.human %></h3>
<div class='contextual timelines-for_previous_heading'>
<%= link_to(l("timelines.new_scenario"),
new_project_scenario_path(@project),
:title => l("timelines.new_scenario"),
:class => 'icon icon-add') %>
</div>
<table class='list'>
<thead>
<tr>
<th colspan="2"><%= Scenario.human_attribute_name(:name) %></th>
<th><%= Scenario.human_attribute_name(:created_at) %></th>
<th><%= Scenario.human_attribute_name(:updated_at) %></th>
<th>&nbsp;<!-- Actions --></th>
</tr>
</thead>
<tbody>
<% @project.scenarios.each do |scenario| %>
<tr class="<%= cycle('odd', 'even', :name => "scenario_table") %>">
<td class="timelines-scenario-name">
<%=h scenario.name %>
</td>
<td class="timelines-scenario-description">
<%= l('timelines.used_in_x_planning_elements', :count => scenario.alternate_dates.count) %>
</td>
<td class="timelines-scenario-created_at">
<%= timelines_time_tag(scenario.created_at) %>
</td>
<td class="timelines-scenario-updated_at">
<%= timelines_time_tag(scenario.updated_at) %>
</td>
<td class="timelines-scenario-actions">
<%= link_to l(:button_edit),
edit_project_scenario_path(@project, scenario),
:class => 'icon icon-edit' %>
<%= link_to l(:button_delete),
confirm_destroy_project_scenario_path(@project, scenario),
:class => 'icon icon-del' %>
</td>
</tr>
<% end %>
</tbody>
</table>