Patch #738
closed
  
my page: new "Projects I am in" block
 
        
        Added by chris mcharg over 17 years ago.
        Updated almost 13 years ago.
        
  
  
  
  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 :)
   
 
  
  Files
  
 
  
  
    
    
    
    i vote +1 for that feature
 
   
  
  
    
    
    
    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)
 
   
  
  
    
    
    
    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>
 
   
  
  
    
    
    
    Oups sorry for this crash text ;)
I will join a new version of the patch file
 
   
  
  
  
  
    
    
    
    
       - Status changed from New to Resolved
- % Done changed from 0 to 100
It seems be resolved. I'm closing ;?)
 
   
  
  
    
    
    
    
       - 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)...
 
   
  
 
  
  
 
Also available in:  Atom
  PDF