From a37af7a2260d7da269a08e2d94d88f67aaad5c9b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 28 Sep 2008 12:03:17 +0000 Subject: Adds a workflow overview screen. Workflow setup moved to a dedicated controller. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1914 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/workflows/edit.rhtml | 64 +++++++++++++++++++++++++++++++++++++++++ app/views/workflows/index.rhtml | 31 ++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 app/views/workflows/edit.rhtml create mode 100644 app/views/workflows/index.rhtml (limited to 'app/views/workflows') diff --git a/app/views/workflows/edit.rhtml b/app/views/workflows/edit.rhtml new file mode 100644 index 000000000..00d6115d9 --- /dev/null +++ b/app/views/workflows/edit.rhtml @@ -0,0 +1,64 @@ +
+<%= link_to l(:field_summary), :action => 'index' %> +
+ +

<%=l(:label_workflow)%>

+ +

<%=l(:text_workflow_edit)%>:

+ +<% form_tag({}, :method => 'get') do %> +

+ + + + +<%= submit_tag l(:button_edit), :name => nil %> +

+<% end %> + + + +<% unless @tracker.nil? or @role.nil? %> +<% form_tag({}, :id => 'workflow_form' ) do %> +<%= hidden_field_tag 'tracker_id', @tracker.id %> +<%= hidden_field_tag 'role_id', @role.id %> +
+ + + + + + + + <% for new_status in @statuses %> + + <% end %> + + + <% for old_status in @statuses %> + + + <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to(@role, @tracker).collect(&:id) -%> + <% for new_status in @statuses -%> + + <% end -%> + + <% end %> +
<%=l(:label_current_status)%><%=l(:label_new_statuses_allowed)%>
<%= new_status.name %>
<%= old_status.name %> + > +
+

<%= check_all_links 'workflow_form' %>

+
+<%= submit_tag l(:button_save) %> +<% end %> + +<% end %> + +<% html_title(l(:label_workflow)) -%> diff --git a/app/views/workflows/index.rhtml b/app/views/workflows/index.rhtml new file mode 100644 index 000000000..2fd080d8f --- /dev/null +++ b/app/views/workflows/index.rhtml @@ -0,0 +1,31 @@ +

<%=l(:label_workflow)%>

+ +<% if @workflow_counts.empty? %> +

<%= l(:label_no_data) %>

+<% else %> + + + + + <% @workflow_counts.first.last.each do |role, count| %> + + + <% end %> + + + +<% @workflow_counts.each do |tracker, roles| -%> + + + <% roles.each do |role, count| -%> + + <% end -%> + +<% end -%> + +
+ <%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %> +
<%= h tracker %> + <%= link_to((count > 1 ? count : image_tag('false.png')), {:action => 'edit', :role_id => role, :tracker_id => tracker}, :title => l(:button_edit)) %> +
+<% end %> -- cgit v1.2.3