OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/homescreen/blocks/_projects.html.erb

36 lines
1.3 KiB

<%= render 'homescreen/blocks/header', title: t(:label_project_plural) %>
<% if @newest_projects.empty? %>
<p class="widget-box--additional-info">
<%= t('homescreen.additional.no_visible_projects') %>
</p>
<% else %>
<p class="widget-box--additional-info"><%= l('homescreen.additional.projects') %></p>
<ul class="widget-box--arrow-links">
<% @newest_projects.each do |project| %>
<li>
<%= link_to project, project_path(project), title: short_project_description(project) %>
<small>(<%= format_date(project.created_at) %>)</small>
</li>
<% end %>
</ul>
<% end %>
<div class="widget-box--blocks--buttons">
<% if User.current.allowed_to?(:add_project, nil, global: true) %>
<%= link_to new_project_path,
{ class: 'button -alt-highlight',
aria: {label: t(:label_project_new)},
title: t(:label_project_new)} do %>
<%= op_icon('button--icon icon-add') %>
<span class="button--text"><%= Project.model_name.human %></span>
<% end %>
<% end %>
<%# If any project exists %>
<% unless @newest_projects.empty? %>
<%= link_to l(:label_project_view_all), projects_path,
class: 'button -highlight-inverted',
title: l(:label_project_view_all) %>
<% end %>
</div>