Revision 1015:52be96e83080 app/views
| app/views/activities/_busy.html.erb | ||
|---|---|---|
| 1 |
<% events = @events_by_day %> |
|
| 2 |
<% if (events.nil?) |
|
| 3 |
activity = Redmine::Activity::Fetcher.new(User.current) |
|
| 4 |
events = activity.events(Date.today - 14, Date.today + 1) |
|
| 5 |
end |
|
| 6 |
%> |
|
| 7 |
|
|
| 8 |
<% if events.empty? %> |
|
| 9 |
|
|
| 10 |
<% else %> |
|
| 11 |
|
|
| 12 |
<ul> |
|
| 13 |
|
|
| 14 |
<% |
|
| 15 |
for project in busy_projects(events, 5) |
|
| 16 |
%> |
|
| 17 |
|
|
| 18 |
<li class="busy"> |
|
| 19 |
<span class="title"> |
|
| 20 |
<% if !project.root? %> |
|
| 21 |
<% project.ancestors.each do |p| %> |
|
| 22 |
<%= h(p) %> » |
|
| 23 |
<% end %> |
|
| 24 |
<% end %> |
|
| 25 |
<%= link_to_project project %> |
|
| 26 |
</span> |
|
| 27 |
<% if !project.is_public? %> |
|
| 28 |
<span class="private"><%= l(:field_is_private) %></span> |
|
| 29 |
<% end %> |
|
| 30 |
<span class='managers'> |
|
| 31 |
<% |
|
| 32 |
u = project.users_by_role |
|
| 33 |
if ! u.empty? %> |
|
| 34 |
(<%= |
|
| 35 |
mgmt_roles = u.keys.select{ |r| r.allowed_to?(:edit_project) }
|
|
| 36 |
managers = mgmt_roles.map{ |r| u[r] }.flatten.sort.uniq
|
|
| 37 |
managers.map{ |m| m.name }.join(', ')
|
|
| 38 |
%>)<% |
|
| 39 |
end |
|
| 40 |
%> |
|
| 41 |
</span> |
|
| 42 |
|
|
| 43 |
<%= render_project_short_description project %> |
|
| 44 |
</li> |
|
| 45 |
|
|
| 46 |
<% end %> |
|
| 47 |
</ul> |
|
| 48 |
<% end %> |
|
| app/views/activities/_busy_institution.html.erb | ||
|---|---|---|
| 1 |
<% events = @events_by_day %> |
|
| 2 |
<% if (events.nil?) |
|
| 3 |
activity = Redmine::Activity::Fetcher.new(User.current) |
|
| 4 |
events = activity.events(Date.today - 14, Date.today + 1) |
|
| 5 |
end |
|
| 6 |
%> |
|
| 7 |
|
|
| 8 |
<% if events.empty? %> |
|
| 9 |
|
|
| 10 |
<% else %> |
|
| 11 |
|
|
| 12 |
<ul> |
|
| 13 |
|
|
| 14 |
<% |
|
| 15 |
for institution in busy_institutions(events, 5) |
|
| 16 |
%> |
|
| 17 |
|
|
| 18 |
<li class="busy"> |
|
| 19 |
<span class="title"> |
|
| 20 |
<%= link_to h(institution), { :controller => 'activities', :institution => institution } %>
|
|
| 21 |
</span> |
|
| 22 |
</li> |
|
| 23 |
|
|
| 24 |
<% end %> |
|
| 25 |
</ul> |
|
| 26 |
<% end %> |
|
| app/views/activities/index.html.erb | ||
|---|---|---|
| 1 |
<h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2> |
|
| 1 |
<h2><%= |
|
| 2 |
if @author.nil? |
|
| 3 |
if @institution_name.blank? |
|
| 4 |
l(:label_activity) |
|
| 5 |
else |
|
| 6 |
l(:label_institution_activity, h(@institution_name)) |
|
| 7 |
end |
|
| 8 |
else |
|
| 9 |
l(:label_user_activity, link_to_user(@author)) |
|
| 10 |
end |
|
| 11 |
%></h2> |
|
| 2 | 12 |
<p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p> |
| 3 | 13 |
|
| 4 | 14 |
<div id="activity"> |
| app/views/projects/_latest.html.erb | ||
|---|---|---|
| 1 |
<ul> |
|
| 2 |
<% for project in Project.latest(User.current) %> |
|
| 3 |
<li class="latest"> |
|
| 4 |
<span class="title"> |
|
| 5 |
<% if !project.root? %> |
|
| 6 |
<% project.ancestors.each do |p| %> |
|
| 7 |
<%= h(p) %> » |
|
| 8 |
<% end %> |
|
| 9 |
<% end %> |
|
| 10 |
<%= link_to_project project %> |
|
| 11 |
</span> |
|
| 12 |
<% if !project.is_public? %> |
|
| 13 |
<span class="private"><%= l(:field_is_private) %></span> |
|
| 14 |
<% end %> |
|
| 15 |
<span class="time"><%= format_time(project.created_on)%></span> |
|
| 16 |
<%= render_project_short_description project %> |
|
| 17 |
</li> |
|
| 18 |
<% end %> |
|
| 19 |
</ul> |
|
| app/views/projects/explore.html.erb | ||
|---|---|---|
| 1 |
|
|
| 2 |
<h2><%= l(:label_explore_projects) %></h2> |
|
| 3 |
|
|
| 4 |
<div class="tags box"> |
|
| 5 |
<h3><%=l(:label_project_tags_all)%></h3> |
|
| 6 |
<%= render :partial => 'projects/tagcloud' %> |
|
| 7 |
</div> |
|
| 8 |
<div class="splitcontentleft"> |
|
| 9 |
<div class="institutions box"> |
|
| 10 |
<h3><%=l(:label_institutions_busy)%></h3> |
|
| 11 |
<%= render :partial => 'activities/busy_institution' %> |
|
| 12 |
</div> |
|
| 13 |
<div class="projects box"> |
|
| 14 |
<h3><%=l(:label_project_latest)%></h3> |
|
| 15 |
<%= render :partial => 'projects/latest' %> |
|
| 16 |
</div> |
|
| 17 |
</div> |
|
| 18 |
<div class="splitcontentright"> |
|
| 19 |
<div class="projects box"> |
|
| 20 |
<h3><%=l(:label_projects_busy)%></h3> |
|
| 21 |
<%= render :partial => 'activities/busy' %> |
|
| 22 |
</div> |
|
| 23 |
</div> |
|
| app/views/welcome/index.html.erb | ||
|---|---|---|
| 14 | 14 |
|
| 15 | 15 |
<div class="splitcontentright"> |
| 16 | 16 |
<% if @site_news.any? %> |
| 17 |
<div class="news box"> |
|
| 18 |
<h3><%=l(:label_news_site_latest)%></h3>
|
|
| 17 |
<div class="news box">
|
|
| 18 |
<h3><%=l(:label_news_site_latest)%></h3>
|
|
| 19 | 19 |
<%= render :partial => 'news/news', :locals => { :project => @site_project }, :collection => @site_news %>
|
| 20 |
|
|
| 21 | 20 |
<%= link_to l(:label_news_more), { :controller => 'projects', :action => @site_project.identifier, :id => 'news' } %>
|
| 22 | 21 |
</div> |
| 23 | 22 |
<% end %> |
| 24 |
<% if @projects.any? %> |
|
| 25 | 23 |
<div class="projects box"> |
| 26 | 24 |
<h3><%=l(:label_project_latest)%></h3> |
| 27 |
<ul> |
|
| 28 |
<% for project in @projects %> |
|
| 29 |
<% @project = project %> |
|
| 30 |
<li class="latest"> |
|
| 31 |
<span class="title"> |
|
| 32 |
<% if !project.root? %> |
|
| 33 |
<% project.ancestors.each do |p| %> |
|
| 34 |
<%= h(p) %> » |
|
| 35 |
<% end %> |
|
| 36 |
<% end %> |
|
| 37 |
<%= link_to_project project %> |
|
| 38 |
</span> |
|
| 39 |
<% if !project.is_public? %> |
|
| 40 |
<span class="private"><%= l(:field_is_private) %></span> |
|
| 41 |
<% end %> |
|
| 42 |
<span class="time"><%= format_time(project.created_on)%></span> |
|
| 43 |
<%= render_project_short_description project %> |
|
| 44 |
</li> |
|
| 45 |
<% end %> |
|
| 46 |
<% @project = nil %> |
|
| 47 |
</ul> |
|
| 48 |
<%= link_to l(:label_projects_more), :controller => 'projects' %> |
|
| 25 |
<%= render :partial => 'projects/latest' %> |
|
| 26 |
<%= link_to l(:label_projects_more), :controller => 'projects' %> |
|
| 49 | 27 |
</div> |
| 50 |
<% end %> |
|
| 51 | 28 |
<%= call_hook(:view_welcome_index_right, :projects => @projects) %> |
| 52 | 29 |
</div> |
| 53 | 30 |
|
Also available in: Unified diff