Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
ddc8da99e4
|
@ -90,7 +90,6 @@ class WordsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroyJournal
|
def destroyJournal
|
||||||
|
|
||||||
@journalP=JournalsForMessage.find(params[:object_id])
|
@journalP=JournalsForMessage.find(params[:object_id])
|
||||||
@journalP.destroy
|
@journalP.destroy
|
||||||
|
|
||||||
|
|
|
@ -211,13 +211,17 @@ module WatchersHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def watchers_checkboxes(object, users, checked=nil)
|
def watchers_checkboxes(object, users, checked=nil)
|
||||||
users.map do |user|
|
if users.nil?
|
||||||
c = checked.nil? ? object.watched_by?(user) : checked
|
|
||||||
tag = check_box_tag 'issue[watcher_user_ids][]', user.id, c, :id => nil
|
else
|
||||||
content_tag 'label', "#{tag} #{h(user)}".html_safe,
|
users.map do |user|
|
||||||
:id => "issue_watcher_user_ids_#{user.id}",
|
c = checked.nil? ? object.watched_by?(user) : checked
|
||||||
:class => "floating"
|
tag = check_box_tag 'issue[watcher_user_ids][]', user.id, c, :id => nil
|
||||||
end.join.html_safe
|
content_tag 'label', "#{tag} #{h(user)}".html_safe,
|
||||||
|
:id => "issue_watcher_user_ids_#{user.id}",
|
||||||
|
:class => "floating"
|
||||||
|
end.join.html_safe
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def applied_css(project)
|
def applied_css(project)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
|
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
|
||||||
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>   
|
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>   
|
||||||
<span class="size">
|
<span class="size">
|
||||||
<% 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',
|
<%= link = link_to(l(:button_add), {:controller => 'code_review',
|
||||||
:action => 'assign', :action_type => 'attachment',
|
:action => 'assign', :action_type => 'attachment',
|
||||||
:id=>@attachment.project,
|
:id=>@attachment.project,
|
||||||
|
|
|
@ -85,7 +85,7 @@ function checkMaxLength() {
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<% if journal.user_id==User.current.id|| User.current.admin? %>
|
<% 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},
|
<%= 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 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= l(:label_x_contribute_to, :count => 0) %>
|
<%= l(:label_x_contribute_to, :count => 0) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="font_description">
|
<p class="font_description">
|
||||||
<% unless user.memberships.empty? %>
|
<% unless user.memberships.empty? %>
|
||||||
|
@ -47,7 +46,6 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
|
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -652,6 +652,7 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'words/append', :to => 'words#append'
|
post 'words/append', :to => 'words#append'
|
||||||
post 'words/create_reply', :to => 'words#create_reply'
|
post 'words/create_reply', :to => 'words#create_reply'
|
||||||
delete 'words/destroy', :to => 'words#destroy'
|
delete 'words/destroy', :to => 'words#destroy'
|
||||||
|
delete 'words/destroyJournal', :to => 'words#destroyJournal'
|
||||||
get 'words/more', :to => 'words#more'
|
get 'words/more', :to => 'words#more'
|
||||||
get 'words/back', :to=> 'words#back'
|
get 'words/back', :to=> 'words#back'
|
||||||
get 'words/destroyJournal', :to => 'words#destroyJournal'
|
get 'words/destroyJournal', :to => 'words#destroyJournal'
|
||||||
|
|
Loading…
Reference in New Issue