diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 9d734db37..b522a09d6 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -83,6 +83,10 @@ class IssuesController < ApplicationController
:limit => @limit)
@issue_count_by_group = @query.issue_count_by_group
+
+
+
+
respond_to do |format|
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
format.api {
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 91da700a1..14814ed32 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -37,16 +37,41 @@ class MyController < ApplicationController
}.freeze
def index
+
page
render :action => 'page'
- end
+ end
# Show user's page
def page
@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
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
def account
@user = User.current
diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb
index 57393b81e..c85cbe32a 100644
--- a/app/views/attachments/file.html.erb
+++ b/app/views/attachments/file.html.erb
@@ -4,7 +4,13 @@
<%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
<%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %>
<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
- (<%= number_to_human_size @attachment.filesize %>)
+ (<%= number_to_human_size @attachment.filesize %>)   
+ <%= 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') %>
+
diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb
index 25d35d407..ca33b7516 100644
--- a/app/views/boards/_course_show.html.erb
+++ b/app/views/boards/_course_show.html.erb
@@ -63,7 +63,9 @@
- <%= link_to h(topic.subject), board_message_path(@board, topic) %> |
+ <%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title: topic.subject.to_s %>
+ |
<%=link_to (topic.replies_count), board_message_path(@board, topic) %> |
回答 |
|
diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb
index 1327f13e9..ef1afd27e 100644
--- a/app/views/boards/_project_show.html.erb
+++ b/app/views/boards/_project_show.html.erb
@@ -71,7 +71,9 @@
- <%= link_to h(topic.subject), board_message_path(@board, topic) %> |
+ <%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %>
+ |
diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb
index 043fe1183..f865235ae 100644
--- a/app/views/files/_show_all_attachment.html.erb
+++ b/app/views/files/_show_all_attachment.html.erb
@@ -3,7 +3,8 @@
<% attachmenttypes = @project.attachmenttypes %>
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
<% edit_allowed = User.current.allowed_to?(:manage_files, @project) %>
-
+
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index ad91c72f8..7f88816f5 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -95,11 +95,11 @@
-
+
<% 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 %>
- <%= 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 %>
@@ -179,9 +179,6 @@
<% end %>
-
-
-
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
diff --git a/app/views/my/blocks/_assiagn_issue.html.erb b/app/views/my/blocks/_assiagn_issue.html.erb
new file mode 100644
index 000000000..6e7df84fd
--- /dev/null
+++ b/app/views/my/blocks/_assiagn_issue.html.erb
@@ -0,0 +1,26 @@
+<% assigned_issues = issuesassignedtome_items %>
+<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
+<% if assigned_issues.length > 0 %>
+
+
+ <%= link_to l(:label_issue_view_all), :controller => 'issues',
+ :action => 'index',
+ :set_filter => 1,
+ :assigned_to_id => 'me',
+ :sort => 'priority:desc,updated_on:desc' %>
+<% 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 %>
\ No newline at end of file
diff --git a/app/views/my/blocks/_issuesassignedtome.html.erb b/app/views/my/blocks/_issuesassignedtome.html.erb
index 02d8c9aa6..0b20dd4e5 100644
--- a/app/views/my/blocks/_issuesassignedtome.html.erb
+++ b/app/views/my/blocks/_issuesassignedtome.html.erb
@@ -1,18 +1,4 @@
<%=l(:label_assigned_to_me_issues)%> (<%= Issue.visible.open.count(:conditions => {:assigned_to_id => ([User.current.id] + User.current.group_ids)})%>)
-
-<% assigned_issues = issuesassignedtome_items %>
-<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
-<% if assigned_issues.length > 0 %>
- <%= link_to l(:label_issue_view_all), :controller => 'issues',
- :action => 'index',
- :set_filter => 1,
- :assigned_to_id => 'me',
- :sort => 'priority:desc,updated_on:desc' %>
-<% 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 %>
+
+ <%= render :partial => "my/blocks/assiagn_issue" %>
+
\ No newline at end of file
diff --git a/app/views/my/page.js.erb b/app/views/my/page.js.erb
new file mode 100644
index 000000000..d3f47a8e1
--- /dev/null
+++ b/app/views/my/page.js.erb
@@ -0,0 +1 @@
+$("#asdsadwsc").html("<%= escape_javascript(render :partial => 'my/blocks/assiagn_issue') %>");
\ No newline at end of file
diff --git a/app/views/my/page2.js.erb b/app/views/my/page2.js.erb
new file mode 100644
index 000000000..d3f47a8e1
--- /dev/null
+++ b/app/views/my/page2.js.erb
@@ -0,0 +1 @@
+$("#asdsadwsc").html("<%= escape_javascript(render :partial => 'my/blocks/assiagn_issue') %>");
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index f93318c7d..ed9001ee2 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -275,6 +275,8 @@ RedmineApp::Application.routes.draw do
match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post
match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post
+ get 'my/page2', :to => 'my#page2', :as => "my_page2"
+
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#destroy_membership', :via => :delete
| | |