<%= submit_tag(l(:submit_create)) %>
+
<% end %>
<% end %>
diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb
index a0263f83..edd3573f 100644
--- a/app/views/dmsf_files/show.html.erb
+++ b/app/views/dmsf_files/show.html.erb
@@ -101,11 +101,13 @@
<%= label_tag("", l(:label_workflow) + ":") %>
- <%= case revision.workflow
- when 1 then l(:option_workflow_waiting_for_approval)
- when 2 then l(:option_workflow_approved)
- else l(:option_workflow_none)
- end %>
+ <%= #case revision.workflow
+ # when 1 then l(:option_workflow_waiting_for_approval)
+ # when 2 then l(:option_workflow_approved)
+ # else l(:option_workflow_none)
+ # end
+ revision.workflow_str
+ %>
<%= label_tag("", l(:label_workflow) + ":") %>
- <%= case upload.workflow
- when 1 then l(:option_workflow_waiting_for_approval)
- when 2 then l(:option_workflow_approved)
- else l(:option_workflow_none)
- end %>
+ <%= #case upload.workflow
+ # when 1 then l(:option_workflow_waiting_for_approval)
+ # when 2 then l(:option_workflow_approved)
+ # else l(:option_workflow_none)
+ # end
+ upload.workflow_str
+ %>
<% end %>
diff --git a/app/views/dmsf_workflows/action.js.erb b/app/views/dmsf_workflows/action.js.erb
index 107ab390..b4294050 100644
--- a/app/views/dmsf_workflows/action.js.erb
+++ b/app/views/dmsf_workflows/action.js.erb
@@ -1,3 +1,3 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'action', :locals => {:workflow => @workflow}) %>');
showModal('ajax-modal', '400px');
-$('#ajax-modal').addClass('new-action');
+$('#ajax-modal').addClass('new-action');
\ No newline at end of file
diff --git a/app/views/dmsf_workflows/new_action.js.erb b/app/views/dmsf_workflows/new_action.js.erb
new file mode 100644
index 00000000..92d31fd2
--- /dev/null
+++ b/app/views/dmsf_workflows/new_action.js.erb
@@ -0,0 +1,2 @@
+$('#ajax-modal').modal('hide').empty();
+window.location.reload();
\ No newline at end of file
diff --git a/assets/images/draft.png b/assets/images/draft.png
new file mode 100644
index 0000000000000000000000000000000000000000..6902ab0cc75af10f160eb1b5f143c77b7f6dc3f8
GIT binary patch
literal 461
zcmV;;0W$uHP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m?d01m?e$8V@)00007bV*G`2i*k^
z2puUwI-kD)00B)&L_t(2&vlSbCeG^&Ux!%-(Xnern{Y$XAYxD5tvASz>`=aPP7H}U6
zM7x^M8>$U|ZLq?p3BlH}4M6JD0pRdl@#NA4K(A{iSQ((0p}*4rpu1f$+@b@})~wT_
z>&0l=(_8+h;CbwwDaWI%V&+OYU)U~JuG(|?Z~Q=FE#<`G1Ik$w>X)7lgM)L2!LUJn
zl^~J6!M=ZW#GhKn03Sdk+{pM)D*&PuBNcl9{_KF!FDOrX`(+=XY;WUU;S@KTJzb
zm+jlMr*tV|6r{Ac(J{&{|QmLNSH00000NkvXXu0mjf
DQQ6Jc
literal 0
HcmV?d00001
diff --git a/assets/javascripts/dmsf.css b/assets/javascripts/dmsf.css
deleted file mode 100644
index 72eaa000..00000000
--- a/assets/javascripts/dmsf.css
+++ /dev/null
@@ -1,50 +0,0 @@
-/* An image next to the approval workflow item in the administration menu */
-#admin-menu a.workflow { background-image: url(../images/ticket_go.png); }
-
-.dmsf-entity-container {
- padding: 0% 2%;
-}
-
-.dmsf-entity-container .dmsf-entity {
- padding: 5px;
- line-height: 28px;
-}
-
-li.dmsf-entity-file,
-li.dmsf-entity-folder {
- border: 1px solid #628DB6;
- border-width: 1px 0;
- list-style: none;
- zoom: 1;
- overflow: hidden;
-}
-
-.dmsf-entity-container .dmsf-entity .dmsf-col {
- float: left;
- padding-top: 1px;
-}
-
-.dmsf-entity-container .dmsf-entity .dmsf-col.dmsf-entity-name {
- width: 30%;
-}
-
-.dmsf-entity-container .dmsf-entity .dmsf-col.dmsf-entity-cat {
- width: 15%;
-}
-
-.dmsf-entity-container .dmsf-entity .dmsf-col.dmsf-entity-lock {
- width: 5%;
-}
-
-.dmsf-entity-container .dmsf-entity .dmsf-col.dmsf-entity-size {
- width: 10%;
-}
-.dmsf-entity-container .dmsf-entity .dmsf-col.dmsf-entity-modified {
- width: 10%;
-}
-.dmsf-entity-container .dmsf-entity .dmsf-col.dmsf-entity-action {
- width: 20%;
-}
-
-#users_for_delegate {height: 200px; overflow:auto;}
-#users_for_delegate label {display: block;}
\ No newline at end of file
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 41a96af5..bf4019e4 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -55,7 +55,7 @@ en:
:title_locked_by_user: "Locked by %{user}"
:title_locked_by_you: "Locked by you"
:title_waiting_for_approval: "Waiting for Approval"
- :title_approved: "Approved"
+ :title_approved: "Approved"
:title_unlock_file: "Unlock to allow changes for other members"
:title_lock_file: "Lock to prevent changes for other members"
:submit_download: "Download"
@@ -95,9 +95,7 @@ en:
:info_changed_by_user: "%{changed} by %{user}"
:label_filename: "Filename"
:label_version: "Version"
- :label_workflow: "Workflow"
- :option_workflow_waiting_for_approval: "Waiting for approval"
- :option_workflow_approved: "Approved"
+ :label_workflow: "Workflow"
:option_workflow_none: "None"
:label_mime: "Mime"
:label_size: "Size"
@@ -223,5 +221,8 @@ en:
label_dmsf: DMSF
label_dmsf_wokflow_action_approve: Approve
label_dmsf_wokflow_action_reject: Reject
- label_dmsf_wokflow_action_delegate: 'Delegate to:'
+ label_dmsf_wokflow_action_delegate: 'Delegate to'
message_dmsf_wokflow_note: Your note...
+ title_draft: Draft
+ title_rejected: Rejected
+ label_dmsf_wokflow_action_start: Start workflow
\ No newline at end of file
diff --git a/db/migrate/20120822100401_create_dmsf_workflows.rb b/db/migrate/20120822100401_create_dmsf_workflows.rb
index c6f20b9a..fbb00c29 100644
--- a/db/migrate/20120822100401_create_dmsf_workflows.rb
+++ b/db/migrate/20120822100401_create_dmsf_workflows.rb
@@ -1,3 +1,21 @@
+# Redmine plugin for Document Management System "Features"
+#
+# Copyright (C) 2013 Karel Picman
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
class CreateDmsfWorkflows < ActiveRecord::Migration
def self.up
create_table :dmsf_workflows do |t|
@@ -5,9 +23,14 @@ class CreateDmsfWorkflows < ActiveRecord::Migration
t.references :project
end
add_index :dmsf_workflows, [:name], :unique => true
+
+ change_table :dmsf_file_revisions do |t|
+ t.references :dmsf_workflow
+ end
end
def self.down
+ remove_column :dmsf_file_revisions, :dmsf_workflow_id
drop_table :dmsf_workflows
end
end
diff --git a/db/migrate/20120822100402_create_dmsf_workflow_steps.rb b/db/migrate/20120822100402_create_dmsf_workflow_steps.rb
index 10c1f313..8d8b3c3a 100644
--- a/db/migrate/20120822100402_create_dmsf_workflow_steps.rb
+++ b/db/migrate/20120822100402_create_dmsf_workflow_steps.rb
@@ -1,3 +1,21 @@
+# Redmine plugin for Document Management System "Features"
+#
+# Copyright (C) 2013 Karel Picman
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
class CreateDmsfWorkflowSteps < ActiveRecord::Migration
def self.up
create_table :dmsf_workflow_steps do |t|
diff --git a/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb b/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb
index c62f2b69..aff1e31f 100644
--- a/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb
+++ b/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb
@@ -1,3 +1,21 @@
+# Redmine plugin for Document Management System "Features"
+#
+# Copyright (C) 2013 Karel Picman
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
class CreateDmsfWorkflowStepAssignments < ActiveRecord::Migration
def self.up
create_table :dmsf_workflow_step_assignments do |t|
diff --git a/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb b/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb
index 77663ab7..e7704c5e 100644
--- a/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb
+++ b/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb
@@ -1,3 +1,21 @@
+# Redmine plugin for Document Management System "Features"
+#
+# Copyright (C) 2013 Karel Picman
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
class CreateDmsfWorkflowStepActions < ActiveRecord::Migration
def self.up
create_table :dmsf_workflow_step_actions do |t|
diff --git a/init.rb b/init.rb
index 1e78d64a..f864c5d9 100644
--- a/init.rb
+++ b/init.rb
@@ -66,9 +66,9 @@ Redmine::Plugin.register :redmine_dmsf do
menu.push :approvalworkflows, {:controller => 'dmsf_workflows', :action => 'index'}, :caption => :label_dmsf_workflow_plural
end
- # Adds javascript and stylesheet tags for project tree view
+ # Adds stylesheet tag
class DmsfViewListener < Redmine::Hook::ViewListener
- def view_layouts_base_html_head(context)
+ def view_layouts_base_html_head(context)
stylesheet_link_tag('dmsf', :plugin => :redmine_dmsf)
end
end