# HG changeset patch # User luisf # Date 1312218513 -3600 # Node ID 2df99e8d191eebed54e2cdf6822bf17a0832c73c # Parent 56ad0c490f5e65dc5514b53031d92531bff4daa0 Feature #240 - does not show link if module disabled. diff -r 56ad0c490f5e -r 2df99e8d191e vendor/plugins/redmine_bibliography/app/views/projects/show.rhtml --- a/vendor/plugins/redmine_bibliography/app/views/projects/show.rhtml Fri Jul 29 19:15:26 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/views/projects/show.rhtml Mon Aug 01 18:08:33 2011 +0100 @@ -3,8 +3,9 @@ <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %> <% end %> - <%= link_to l(:label_add_publication_to_project), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %> - + <% if @project.module_enabled? :redmine_bibliography %> + <%= link_to l(:label_add_publication_to_project), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %> + <% end %>

<%=l(:label_overview)%>

diff -r 56ad0c490f5e -r 2df99e8d191e vendor/plugins/redmine_bibliography/config/locales/en.yml --- a/vendor/plugins/redmine_bibliography/config/locales/en.yml Fri Jul 29 19:15:26 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/config/locales/en.yml Mon Aug 01 18:08:33 2011 +0100 @@ -24,6 +24,7 @@ label_publications_plural: "Publications" label_publication_new: "Create New Publication" + label_publication_index: "List of Publication" label_add_publication_to_project: "Add Publication to this project" label_publication_edit: "Edit Publication" label_publication_show: "Publication Details" diff -r 56ad0c490f5e -r 2df99e8d191e vendor/plugins/redmine_bibliography/init.rb --- a/vendor/plugins/redmine_bibliography/init.rb Fri Jul 29 19:15:26 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/init.rb Mon Aug 01 18:08:33 2011 +0100 @@ -32,8 +32,8 @@ project_module :redmine_bibliography do permission :publications, { :publications => :index }, :public => true - permission :edit_redmine_bibliography, {:redmine_bibliography => [:edit, :update]}, :public => true - permission :add_publication, {:redmine_bibliography => [:new, :create]}, :public => true + permission :edit_redmine_bibliography, {:redmine_bibliography => [:edit, :update]} + permission :add_publication, {:redmine_bibliography => [:new, :create]} end # extending the Project Menu