diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 2d03b2112..f2502e03e 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -90,7 +90,6 @@ class WordsController < ApplicationController end def destroyJournal - @journalP=JournalsForMessage.find(params[:object_id]) @journalP.destroy diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index be5609d7c..b05e0b286 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -211,13 +211,17 @@ module WatchersHelper end def watchers_checkboxes(object, users, checked=nil) - users.map do |user| - c = checked.nil? ? object.watched_by?(user) : checked - tag = check_box_tag 'issue[watcher_user_ids][]', user.id, c, :id => nil - content_tag 'label', "#{tag} #{h(user)}".html_safe, - :id => "issue_watcher_user_ids_#{user.id}", - :class => "floating" - end.join.html_safe + if users.nil? + + else + users.map do |user| + c = checked.nil? ? object.watched_by?(user) : checked + tag = check_box_tag 'issue[watcher_user_ids][]', user.id, c, :id => nil + content_tag 'label', "#{tag} #{h(user)}".html_safe, + :id => "issue_watcher_user_ids_#{user.id}", + :class => "floating" + end.join.html_safe + end end def applied_css(project) diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb index 37db6f2bc..186b85c69 100644 --- a/app/views/attachments/file.html.erb +++ b/app/views/attachments/file.html.erb @@ -6,7 +6,7 @@
<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> (<%= number_to_human_size @attachment.filesize %>)    - <% if @attachment!=nil&&@attachment.container_type == 'Document' %> + <% if @attachment!=nil&&@attachment.container_type == 'Document'&&User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> <%= link = link_to(l(:button_add), {:controller => 'code_review', :action => 'assign', :action_type => 'attachment', :id=>@attachment.project, diff --git a/app/views/projects/feedback.html.erb b/app/views/projects/feedback.html.erb index 8e36b8c59..f9182c544 100644 --- a/app/views/projects/feedback.html.erb +++ b/app/views/projects/feedback.html.erb @@ -85,7 +85,7 @@ function checkMaxLength() { <% if User.current.logged? %> <% if journal.user_id==User.current.id|| User.current.admin? %> <%= link_to(l(:button_delete),{:controller => 'words', :action => 'destroyJournal', :object_id => journal.id, :project_id=>@project.id, :page=>@page}, - :remote => true, :title => l(:button_delete)) %> + :remote => true, :title => l(:button_delete), :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete") %> <% end %> <% end %> diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index f9e4341bf..984cdf352 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -30,7 +30,6 @@ <% else %> <%= l(:label_x_contribute_to, :count => 0) %> <% end %> -
<% unless user.memberships.empty? %> @@ -47,7 +46,6 @@ -