parent
cbd3610bf4
commit
b635a6b3c5
|
@ -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,16 +37,41 @@ class MyController < ApplicationController
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
page
|
page
|
||||||
render :action => 'page'
|
render :action => 'page'
|
||||||
end
|
end
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -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