Mercurial > hg > soundsoftware-site
changeset 550:2df99e8d191e feature_36
Feature #240 - does not show link if module disabled.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 01 Aug 2011 18:08:33 +0100 |
parents | 56ad0c490f5e |
children | 61e0de6cc1bb 258b68689b28 |
files | vendor/plugins/redmine_bibliography/app/views/projects/show.rhtml vendor/plugins/redmine_bibliography/config/locales/en.yml vendor/plugins/redmine_bibliography/init.rb |
diffstat | 3 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 %> </div> <h2><%=l(:label_overview)%></h2>
--- 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"
--- 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