give-project-info-a-box.patch

Anonymous, 2019-09-04 20:53

Download (3.17 KB)

View differences:

app/views/projects/show.html.erb (working copy)
24 24

  
25 25
<div class="splitcontent">
26 26
<div class="splitcontentleft">
27
  <% if @project.description.present? %>
28
  <div class="wiki">
29
    <%= textilizable @project.description %>
27
  <% if @project.description.present? || @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?) %>
28
    <div class="proj-info box">
29
      <h3 class="icon icon-help"><%= l(:label_proj_info) %></h3>
30
      <% if @project.description.present? %>
31
      <div class="wiki">
32
        <%= textilizable @project.description %>
33
      </div>
34
      <% end %>
35
      <% if @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?) %>
36
      <ul>
37
      <% unless @project.homepage.blank? %>
38
        <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
39
      <% end %>
40
      <% render_custom_field_values(@project) do |custom_field, formatted| %>
41
        <li class="<%= custom_field.css_classes %>"><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
42
      <% end %>
43
      </ul>
44
      <% end %>
30 45
  </div>
31 46
  <% end %>
32
  <% if @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?) %>
33
  <ul>
34
  <% unless @project.homepage.blank? %>
35
    <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
36
  <% end %>
37
  <% render_custom_field_values(@project) do |custom_field, formatted| %>
38
    <li class="<%= custom_field.css_classes %>"><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
39
  <% end %>
40
  </ul>
41
  <% end %>
42 47

  
43 48
  <% if User.current.allowed_to?(:view_issues, @project) %>
44 49
  <div class="issues box">
......
132 137
	<ul class="subprojects">
133 138
	  <% @subprojects.each do |project| %>
134 139
	  <li><%= link_to(project.name, project_path(project), :class => project.css_classes).html_safe %></li>
135
	  <% end %> 
140
	  <% end %>
136 141
    </ul>
137 142
  </div>
138 143
  <% end %>
config/locales/en-GB.yml (working copy)
669 669
  label_preview: Preview
670 670
  label_feed_plural: Feeds
671 671
  label_changes_details: Details of all changes
672
  label_proj_info: Information
672 673
  label_issue_tracking: Issue tracking
673 674
  label_spent_time: Spent time
674 675
  label_overall_spent_time: Overall spent time
config/locales/en.yml (working copy)
821 821
  label_preview: Preview
822 822
  label_feed_plural: Feeds
823 823
  label_changes_details: Details of all changes
824
  label_proj_info: Information
824 825
  label_issue_tracking: Issue tracking
825 826
  label_spent_time: Spent time
826 827
  label_total_spent_time: Total spent time