-
<%= f.text_field :name, :required => true, :size => 50 %>
-
-
<%= f.text_area :description, :cols => 40, :rows => 5 %>
-
-
-
-
+
+
+
<%= f.text_field :name, :required => true, :size => 50 %>
+
<%= f.text_field :author, :size => 50, :label => :field_custom_workflow_author %>
+ <%= l(:text_custom_workflow_author) %>
+
+
<%= f.text_area :description, :cols => 40, :rows => 5 %>
+
<%= f.check_box :is_for_all, :onclick => "checkAndDisable('custom_workflow_enabled_projects', this.checked);", :label => :field_enabled_for_all_projects %>
+
diff --git a/app/views/custom_workflows/edit.html.erb b/app/views/custom_workflows/edit.html.erb
index bd23ace..ffd0be0 100644
--- a/app/views/custom_workflows/edit.html.erb
+++ b/app/views/custom_workflows/edit.html.erb
@@ -2,11 +2,9 @@
<%= error_messages_for 'workflow' %>
-<% form = form_for @workflow, :builder => (TabularFormBuilder rescue Redmine::Views::LabelledFormBuilder) do |f| %>
+<%= labelled_form_for @workflow do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= submit_tag l(:button_save) %>
<% end %>
-<%= form if Redmine::VERSION::MAJOR >= 2 %>
-
<% html_title(l(:label_custom_workflow_plural), @workflow, l(:label_administration)) -%>
diff --git a/app/views/custom_workflows/index.html.erb b/app/views/custom_workflows/index.html.erb
index e3399e7..6e97dce 100644
--- a/app/views/custom_workflows/index.html.erb
+++ b/app/views/custom_workflows/index.html.erb
@@ -1,6 +1,7 @@
<% html_title(l(:label_custom_workflow_plural)) -%>
-<%= link_to l(:label_custom_workflow_new), new_custom_workflow_path, :class => 'icon icon-add' %>
+ <%= link_to l(:label_custom_workflow_import), '#', :class => 'icon icon-import', :onclick => "showModal('import-dialog', '450px'); return false;" %>
+ <%= link_to l(:label_custom_workflow_new), new_custom_workflow_path, :class => 'icon icon-add' %>
<%=l(:label_custom_workflow_plural)%>
@@ -12,6 +13,7 @@
| <%=l(:field_name)%> |
<%=l(:field_description)%> |
+ <%=l(:field_author)%> |
<%=l(:label_project_plural)%> |
<%= l(:button_sort) %> |
|
@@ -21,8 +23,9 @@
<% @workflows.each do |workflow| %>
">
| <%= link_to(workflow.name, edit_custom_workflow_path(workflow)) %> |
- <%= textilizable(workflow.description) %> |
-
+ | <%= textilizable(workflow.description) %> |
+ <%= workflow.author %> |
+
<% if workflow.is_for_all? %>
<%= l(:field_enabled_for_all_projects) %>
<% elsif workflow.projects.empty? %>
@@ -33,6 +36,7 @@
|
<%= reorder_links("custom_workflow", {:action => 'update', :id => workflow}) %> |
+ <%= link_to(l(:label_custom_workflow_export), export_custom_workflow_path(workflow), :class => 'icon icon-export', :method => :get) %>
<%= link_to(l(:button_delete), workflow, :class => 'icon icon-del', :data => {:confirm => l(:text_are_you_sure)}, :confirm => l(:text_are_you_sure), :method => :delete) %>
|
@@ -42,4 +46,22 @@
<% else %>
<%= l(:label_no_data) %>
<% end %>
+
+
+
+
<%= l(:label_custom_workflow_import) %>
+ <%= form_tag import_custom_workflow_path, :multipart => true do %>
+
+ <%= l(:field_custom_workflow_file) %>:
+
+
+
+ <%= file_field_tag 'file', :accept => 'application/xml' %>
+
+
+
+ <%= submit_tag l(:button_import), :name => nil, :onclick => "hideModal(this);" %>
+ <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
+
+ <% end %>
\ No newline at end of file
diff --git a/app/views/projects/settings/_custom_workflow.html.erb b/app/views/projects/settings/_custom_workflow.html.erb
index 1f4ee96..b3a4e8d 100644
--- a/app/views/projects/settings/_custom_workflow.html.erb
+++ b/app/views/projects/settings/_custom_workflow.html.erb
@@ -1,4 +1,4 @@
-<% form = form_for @project do |f| %>
+<%= form_for @project do |f| %>
<%= hidden_field_tag :tab, 'custom_workflow' %>
<%= hidden_field_tag 'project[custom_workflow_ids][]', '' %>