Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
273c932acf
|
@ -83,6 +83,10 @@ class IssuesController < ApplicationController
|
||||||
:limit => @limit)
|
:limit => @limit)
|
||||||
@issue_count_by_group = @query.issue_count_by_group
|
@issue_count_by_group = @query.issue_count_by_group
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
|
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
|
||||||
format.api {
|
format.api {
|
||||||
|
|
|
@ -37,6 +37,7 @@ class MyController < ApplicationController
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
page
|
page
|
||||||
render :action => 'page'
|
render :action => 'page'
|
||||||
end
|
end
|
||||||
|
@ -44,9 +45,33 @@ class MyController < ApplicationController
|
||||||
# Show user's page
|
# Show user's page
|
||||||
def page
|
def page
|
||||||
@user = User.current
|
@user = User.current
|
||||||
|
@Issues= Issue.visible.open.
|
||||||
|
where(:assigned_to_id => ([User.current.id] + User.current.group_ids))
|
||||||
|
@limit = 10
|
||||||
|
@feedback_count = @Issues.count
|
||||||
|
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||||
|
@offset ||= @feedback_pages.offset
|
||||||
|
@curse_attachments = @Issues[@offset, @limit]
|
||||||
|
|
||||||
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
|
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def page2
|
||||||
|
@limit = 10
|
||||||
|
@user = User.current
|
||||||
|
@Issues= Issue.visible.open.
|
||||||
|
where(:assigned_to_id => ([User.current.id] + User.current.group_ids))
|
||||||
|
@feedback_count = @Issues.count
|
||||||
|
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||||
|
@offset ||= @feedback_pages.offset
|
||||||
|
@curse_attachments = @Issues[@offset, @limit]
|
||||||
|
@state = false
|
||||||
|
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Edit user's account
|
# Edit user's account
|
||||||
def account
|
def account
|
||||||
@user = User.current
|
@user = User.current
|
||||||
|
|
|
@ -4,7 +4,13 @@
|
||||||
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
|
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
|
||||||
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p>
|
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p>
|
||||||
<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></p>
|
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span>   <span class="size">
|
||||||
|
<%= link = link_to(l(:button_add), {:controller => 'code_review',
|
||||||
|
:action => 'assign', :action_type => 'attachment',
|
||||||
|
:id=>@attachment.project,
|
||||||
|
:change_id => '', :attachment_id => @attachment.id,
|
||||||
|
}, :class => 'icon icon-add') %>
|
||||||
|
</span></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,9 @@
|
||||||
<td>
|
<td>
|
||||||
<table width="640px" border="0">
|
<table width="640px" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td>
|
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %>
|
||||||
|
<%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title: topic.subject.to_s %>
|
||||||
|
</td>
|
||||||
<td align="right" rowspan="3"><table class="borad-count"><tr><td align="center" class="borad-count-digit"><%=link_to (topic.replies_count), board_message_path(@board, topic) %></td></tr>
|
<td align="right" rowspan="3"><table class="borad-count"><tr><td align="center" class="borad-count-digit"><%=link_to (topic.replies_count), board_message_path(@board, topic) %></td></tr>
|
||||||
<tr><td align="center">回答</td></tr>
|
<tr><td align="center">回答</td></tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
|
|
|
@ -71,7 +71,9 @@
|
||||||
<td>
|
<td>
|
||||||
<table width="640px" border="0">
|
<table width="640px" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), board_message_path(@board, topic) %></td>
|
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %>
|
||||||
|
<%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %>
|
||||||
|
</td>
|
||||||
<td align="right" rowspan="3">
|
<td align="right" rowspan="3">
|
||||||
<table class="borad-count">
|
<table class="borad-count">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
<% attachmenttypes = @project.attachmenttypes %>
|
<% attachmenttypes = @project.attachmenttypes %>
|
||||||
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
||||||
<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
||||||
<table class="list files" id="ver-zebra">
|
<div class="autoscroll">
|
||||||
|
<table class="list files" id="ver-zebra" style="width: 100%;table-layout: fixed">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col class="vzebra-odd"/>
|
<col class="vzebra-odd"/>
|
||||||
<col class="vzebra-even"/>
|
<col class="vzebra-even"/>
|
||||||
|
@ -40,17 +41,17 @@
|
||||||
<%next%>
|
<%next%>
|
||||||
<%end%>
|
<%end%>
|
||||||
<tr class="file <%= cycle("odd", "odd") %>">
|
<tr class="file <%= cycle("odd", "odd") %>">
|
||||||
<td class="filename" style="font-size: 13px; "><%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %></td>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filename" style="font-size: 13px; "><%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %></td>
|
||||||
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> -->
|
<!-- <td class="created_on"><%#= format_time(file.created_on) %></td> -->
|
||||||
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="filesize"><%= number_to_human_size(file.filesize) %></td>
|
||||||
<td class="attach_type">
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="attach_type">
|
||||||
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.typeName %></span>
|
<span id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.typeName %></span>
|
||||||
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
|
<span id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
|
||||||
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %>
|
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="content_type"><%= file.show_suffix_type %></td>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="content_type"><%= file.show_suffix_type %></td>
|
||||||
<td class="field_file_dense">
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="field_file_dense">
|
||||||
<span id="field_file_dense_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.file_dense_str %></span>
|
<span id="field_file_dense_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.file_dense_str %></span>
|
||||||
|
|
||||||
<span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;">
|
<span id="field_file_dense_id_edit<%= file.id %>" style="white-space:nowrap;">
|
||||||
|
@ -58,9 +59,9 @@
|
||||||
:attachment => file} %>
|
:attachment => file} %>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="downloads"><%= file.downloads %></td>
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="downloads"><%= file.downloads %></td>
|
||||||
<!-- <td class="digest" width="300px"><%= file.description %></td> -->
|
<!-- <td class="digest" width="300px"><%= file.description %></td> -->
|
||||||
<td align="center">
|
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" align="center">
|
||||||
<%= link_to(image_tag('delete.png'), attachment_path(file),
|
<%= link_to(image_tag('delete.png'), attachment_path(file),
|
||||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
|
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
|
||||||
</td>
|
</td>
|
||||||
|
@ -83,7 +84,7 @@
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<!--分页-->
|
<!--分页-->
|
||||||
<div class="pagination" style="float:left;">
|
<div class="pagination" style="float:left;">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -96,9 +96,9 @@
|
||||||
<div class="memo-section">
|
<div class="memo-section">
|
||||||
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
|
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
|
||||||
<% if @project %>
|
<% if @project %>
|
||||||
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
|
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
|
||||||
<% elsif @course %>
|
<% elsif @course %>
|
||||||
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, course_boards_path(@topic.course) %>
|
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-content">
|
<div class="memo-content">
|
||||||
|
@ -109,14 +109,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-timestamp">
|
<div class="memo-timestamp">
|
||||||
<div style="float: left"><%= authoring @topic.created_on, @topic.author %></div>
|
<div style="float: left"><%= authoring @topic.created_on, @topic.author %></div>
|
||||||
|
|
||||||
|
|
||||||
<div style="float: right"><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></div>
|
<div style="float: right"><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -95,11 +95,11 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-section" style="width: 100%;word-break: break-all;">
|
<div class="memo-section" style="width: 100%;word-break: break-all;">
|
||||||
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
|
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>" style="width: 83%;word-break: break-all;">
|
||||||
<% if @project %>
|
<% if @project %>
|
||||||
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
|
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
|
||||||
<% elsif @course %>
|
<% elsif @course %>
|
||||||
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, course_boards_path(@topic.course) %>
|
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="memo-content">
|
<div class="memo-content">
|
||||||
|
@ -179,9 +179,6 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||||
<div id="reply" style="display:none;">
|
<div id="reply" style="display:none;">
|
||||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<% assigned_issues = issuesassignedtome_items %>
|
||||||
|
<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
|
||||||
|
<% if assigned_issues.length > 0 %>
|
||||||
|
<!--分页-->
|
||||||
|
<!--
|
||||||
|
<div class="pagination" style="float:left;">
|
||||||
|
<ul>
|
||||||
|
<%#= pagination_links_full(@feedback_pages,@feedback_count, :per_page_links => false){|text, parameters, options|
|
||||||
|
link_to text, my_page2_path(parameters.merge(:q => params[:q])) }%>
|
||||||
|
<%#= pagination_links_full @feedback_pages %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
|
||||||
|
:action => 'index',
|
||||||
|
:set_filter => 1,
|
||||||
|
:assigned_to_id => 'me',
|
||||||
|
:sort => 'priority:desc,updated_on:desc' %></p>
|
||||||
|
<% end %>
|
||||||
|
<% content_for :header_tags do %>
|
||||||
|
<%= auto_discovery_link_tag(:atom,
|
||||||
|
{:controller => 'issues', :action => 'index', :set_filter => 1,
|
||||||
|
:assigned_to_id => 'me', :format => 'atom', :key => User.current.rss_key},
|
||||||
|
{:title => l(:label_assigned_to_me_issues)}) %>
|
||||||
|
|
||||||
|
<% end %>
|
|
@ -1,18 +1,4 @@
|
||||||
<h3><%=l(:label_assigned_to_me_issues)%> (<%= Issue.visible.open.count(:conditions => {:assigned_to_id => ([User.current.id] + User.current.group_ids)})%>)</h3>
|
<h3><%=l(:label_assigned_to_me_issues)%> (<%= Issue.visible.open.count(:conditions => {:assigned_to_id => ([User.current.id] + User.current.group_ids)})%>)</h3>
|
||||||
|
<div id="asdsadwsc">
|
||||||
<% assigned_issues = issuesassignedtome_items %>
|
<%= render :partial => "my/blocks/assiagn_issue" %>
|
||||||
<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
|
</div>
|
||||||
<% if assigned_issues.length > 0 %>
|
|
||||||
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
|
|
||||||
:action => 'index',
|
|
||||||
:set_filter => 1,
|
|
||||||
:assigned_to_id => 'me',
|
|
||||||
:sort => 'priority:desc,updated_on:desc' %></p>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
|
||||||
<%= auto_discovery_link_tag(:atom,
|
|
||||||
{:controller => 'issues', :action => 'index', :set_filter => 1,
|
|
||||||
:assigned_to_id => 'me', :format => 'atom', :key => User.current.rss_key},
|
|
||||||
{:title => l(:label_assigned_to_me_issues)}) %>
|
|
||||||
<% end %>
|
|
|
@ -0,0 +1 @@
|
||||||
|
$("#asdsadwsc").html("<%= escape_javascript(render :partial => 'my/blocks/assiagn_issue') %>");
|
|
@ -0,0 +1 @@
|
||||||
|
$("#asdsadwsc").html("<%= escape_javascript(render :partial => 'my/blocks/assiagn_issue') %>");
|
|
@ -275,6 +275,8 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post
|
match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post
|
||||||
match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post
|
match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post
|
||||||
|
|
||||||
|
get 'my/page2', :to => 'my#page2', :as => "my_page2"
|
||||||
|
|
||||||
resources :users
|
resources :users
|
||||||
match 'users/:id/memberships/:membership_id', :to => 'users#edit_membership', :via => :put, :as => 'user_membership'
|
match 'users/:id/memberships/:membership_id', :to => 'users#edit_membership', :via => :put, :as => 'user_membership'
|
||||||
match 'users/:id/memberships/:membership_id', :to => 'users#destroy_membership', :via => :delete
|
match 'users/:id/memberships/:membership_id', :to => 'users#destroy_membership', :via => :delete
|
||||||
|
|
Loading…
Reference in New Issue