Mercurial > hg > soundsoftware-site
diff vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb @ 579:2ada25d4b0a8 feature_36
Working on the project add/remove from publications list
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 10 Aug 2011 16:20:14 +0100 |
parents | 724c97fc03dc |
children | 22262ff56e84 |
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 10 14:40:05 2011 +0100 +++ b/vendor/plugins/redmine_bibliography/app/helpers/publications_helper.rb Wed Aug 10 16:20:14 2011 +0100 @@ -76,10 +76,18 @@ end def render_projects_list(publication) + logger.error { "PROJECT NAME #{@project.name unless @project.nil?}" } + s = "" publication.projects.each do |proj| - s << link_to_project(proj) + link_to_remote(l(:button_delete), { :url => { :controller => 'publications', :action => 'remove_project', :id => publication, :remove_project_id => proj, :project_id => @project }, :method => :post }, :class => 'icon icon-del') + "<br />" + if @project == proj + confirm_msg = "Are you sure you want to remove the current project from this publication's projects list?" + else + confirm_msg = false + end + + s << link_to_project(proj) + link_to_remote(l(:button_delete), { :url => { :controller => 'publications', :action => 'remove_project', :id => publication, :remove_project_id => proj, :project_id => @project }, :method => :post, :confirm => confirm_msg }, :class => 'icon icon-del') + "<br />" end s