* separated user DMSF project preferences
git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@34 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
parent
18758ce780
commit
cebfe4dd90
@ -49,11 +49,14 @@ class DmsfStateController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def user_pref
|
def user_pref
|
||||||
|
end
|
||||||
|
|
||||||
|
def user_pref_save
|
||||||
@user_pref = DmsfUserPref.for(@project, User.current)
|
@user_pref = DmsfUserPref.for(@project, User.current)
|
||||||
@user_pref.email_notify = params[:email_notify];
|
@user_pref.email_notify = params[:email_notify];
|
||||||
@user_pref.save
|
@user_pref.save
|
||||||
flash[:notice] = l(:notice_your_preferences_were_saved)
|
flash[:notice] = l(:notice_your_preferences_were_saved)
|
||||||
redirect_to URI.unescape(params[:current])
|
redirect_to :action => "user_pref", :id => @project
|
||||||
end
|
end
|
||||||
|
|
||||||
def folder_notify_activate
|
def folder_notify_activate
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<% html_title("DMSF") %>
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<% if User.current.allowed_to?(:folder_manipulation, @project) %>
|
<% if User.current.allowed_to?(:folder_manipulation, @project) %>
|
||||||
@ -162,7 +162,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
|
|||||||
<%= render(:partial => "multi_upload") %>
|
<%= render(:partial => "multi_upload") %>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<%= render(:partial => "user_pref") %>
|
<%= link_to(l(:link_user_preferences), {:controller => "dmsf_state", :action => "user_pref", :id => @project}) %>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
|
<% html_title(l(:dmsf)) %>
|
||||||
|
|
||||||
|
<div class="contextual">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2><%= l(:link_user_preferences) %></h2>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<% form_tag({:controller => "dmsf_state", :action => "user_pref", :id => @project, :current => URI.escape(request.url)},
|
<% form_tag({:controller => "dmsf_state", :action => "user_pref_save", :id => @project},
|
||||||
:method=>:post) do %>
|
:method=>:post) do %>
|
||||||
<h3>Your <%= l(:dmsf) %> preferences for project</h3>
|
|
||||||
<div>
|
<div>
|
||||||
Notifications:
|
Notifications:
|
||||||
<%= select_tag("email_notify",
|
<%= select_tag("email_notify",
|
||||||
@ -10,4 +16,8 @@
|
|||||||
<%= submit_tag("Save", :title => "Save preferences") %>
|
<%= submit_tag("Save", :title => "Save preferences") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% content_for :header_tags do %>
|
||||||
|
<%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %>
|
||||||
|
<% end %>
|
||||||
@ -49,7 +49,6 @@ cs:
|
|||||||
:title_notifications_active_deactivate: "Notifications active: Deactivate"
|
:title_notifications_active_deactivate: "Notifications active: Deactivate"
|
||||||
:title_notifications_not_active_activate: "Notifications not active: Activate"
|
:title_notifications_not_active_activate: "Notifications not active: Activate"
|
||||||
:title_title_version_version_download: "%{title} version %{version} download"
|
:title_title_version_version_download: "%{title} version %{version} download"
|
||||||
|
|
||||||
:title_locked_by_user: "Locked by %{user}"
|
:title_locked_by_user: "Locked by %{user}"
|
||||||
:title_locked_by_you: "Locked by you"
|
:title_locked_by_you: "Locked by you"
|
||||||
:title_waiting_for_approval: "Waiting for Approval"
|
:title_waiting_for_approval: "Waiting for Approval"
|
||||||
@ -60,3 +59,6 @@ cs:
|
|||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
|
||||||
|
:link_user_preferences: "Your DMSF project preferences"
|
||||||
|
|
||||||
@ -59,4 +59,5 @@ de:
|
|||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
:link_user_preferences: "Your DMSF project preferences"
|
||||||
|
|
||||||
@ -59,4 +59,5 @@ en-GB:
|
|||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
:link_user_preferences: "Your DMSF project preferences"
|
||||||
|
|
||||||
@ -58,4 +58,5 @@ en:
|
|||||||
:submit_download: "Download"
|
:submit_download: "Download"
|
||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
:link_user_preferences: "Your DMSF project preferences"
|
||||||
@ -59,4 +59,5 @@ es:
|
|||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
:link_user_preferences: "Your DMSF project preferences"
|
||||||
|
|
||||||
@ -59,4 +59,5 @@ fr:
|
|||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
:link_user_preferences: "Your DMSF project preferences"
|
||||||
|
|
||||||
@ -59,4 +59,5 @@ ru:
|
|||||||
:title_download_checked: "Download checked in Zip archive"
|
:title_download_checked: "Download checked in Zip archive"
|
||||||
:submit_email: "Email"
|
:submit_email: "Email"
|
||||||
:title_send_checked_by_email: "Send checked by email"
|
:title_send_checked_by_email: "Send checked by email"
|
||||||
|
:link_user_preferences: "Your DMSF project preferences"
|
||||||
|
|
||||||
2
init.rb
2
init.rb
@ -43,7 +43,7 @@ Redmine::Plugin.register :redmine_dmsf do
|
|||||||
|
|
||||||
project_module :dmsf do
|
project_module :dmsf do
|
||||||
permission :browse_documents, {:dmsf => [:index]}
|
permission :browse_documents, {:dmsf => [:index]}
|
||||||
permission :user_preferences, {:dmsf_state => [:user_pref]}
|
permission :user_preferences, {:dmsf_state => [:user_pref, :user_pref_save]}
|
||||||
permission :view_dmsf_files, {:dmsf => [:download_file, :download_revision, :entries_operation, :email_entries_send],
|
permission :view_dmsf_files, {:dmsf => [:download_file, :download_revision, :entries_operation, :email_entries_send],
|
||||||
:dmsf_detail => [:file_detail]}
|
:dmsf_detail => [:file_detail]}
|
||||||
permission :folder_manipulation, {:dmsf_detail => [:create_folder, :delete_folder, :folder_detail, :save_folder]}
|
permission :folder_manipulation, {:dmsf_detail => [:create_folder, :delete_folder, :folder_detail, :save_folder]}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user