Patch #738
my page: new "Projects I am in" block
| Status: | Closed | Start date: | 2008-02-25 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% | |
| Category: | UI | |||
| Target version: | - |
Description
The info that I really want on my my page is a list of tickets assigned to me and a list of projects I'm in.
This patch adds a block for the list of projects... nice and simple.
It is based on existing code, so it should work OK :)
History
#1 Updated by Raz Mataz about 5 years ago
i vote +1 for that feature
#2 Updated by Bill Marquette almost 5 years ago
This is also something I just wrote for my own install within two hours of installation. The biggest difference between the attached patch and what I did, was that I used the find code right out of the projects controller to find the list of projects (Project.find :all, :conditions => Project.visible_by(User.current), :include => :parent)
#3 Updated by Romain GEORGES about 4 years ago
update for the new version (resolve the bug with "parent")
The code is like in account/show
<h3><%=l(:label_projects_i_am_in)%></h3>
<% user = User.active.current
memberships = user.memberships.select do |membership|
membership.project.is_public? || (User.current.member_of?(membership.project))
end
>
< unless memberships.empty? >
<h3><=l(:label_project_plural)%></h3>
<ul>
<% for membership in memberships >
<li><= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) >
(<=h membership.role.name >, <= format_date(membership.created_on) >)</li>
< end >
</ul>
< end %>
<p class="small"><%= link_to l(:label_project_all), :controller => 'projects', :action => 'index' %></p>
#4 Updated by Romain GEORGES about 4 years ago
Oups sorry for this crash text ;)
I will join a new version of the patch file
#5 Updated by Romain GEORGES about 4 years ago
- File mypage-block-projects_2.patch
added
#6 Updated by Ladislav Nesnera over 2 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
It seems be resolved. I'm closing ;?)
#7 Updated by Jan Niggemann 4 months ago
- Status changed from Resolved to Closed
Closing this, status is resolved since 400 days and more (issue was last updated more than 400 days ago)...