To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / plugins / redmine_bibliography / app / views / projects / show.html.erb @ 1313:17f075c7fd41

History | View | Annotate | Download (5.58 KB)

1
<div class="contextual">
2
        <% if User.current.allowed_to?(:add_subprojects, @project) %>
3
                <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %>
4
        <% end %>
5
        
6
  <% if User.current.allowed_to?(:close_project, @project) %>
7
    <% if @project.active? %>
8
      <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %>
9
    <% else %>
10
      <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
11
    <% end %>
12
  <% end %>
13

    
14
        <% if @project.module_enabled? :redmine_bibliography %>
15
          <% if User.current.allowed_to?(:add_publication, @project) %>        
16
                  <%= link_to l(:label_add_publication_to_project), {:controller => 'publications', :action => 'new', :project_id => @project}, :class => 'icon icon-add' %>                
17
          <% end %>
18
        <% end %>
19
</div>
20

    
21
<% if @project.has_welcome_page %>
22
<% page = @project.wiki.find_page("Overview") %>
23
<% end %>
24

    
25
<% if page %>
26

    
27
<% if @project.module_enabled? :wiki %>
28
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
29
<div class="contextual">
30
<%= link_to(l(:button_welcome_page_edit_this), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
31
</div>
32
<% end %>
33
<% end %>
34

    
35
<div class="contextual" style="clear: right">
36
<ul>
37
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li><% end %>
38
<% if @subprojects.any? %>
39
        <li><%=l(:label_subproject_plural)%>:
40
            <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ").html_safe %></li>
41
<% end %>
42
</ul>
43
</div>
44

    
45
<%= render(:partial => "wiki/content", :locals => {:content => page.content_for_version()}) %>
46

    
47
<% else %>
48

    
49
<h2><%=l(:label_overview)%></h2> 
50
        
51
<% unless @project.active? %>
52
  <p class="warning"><span class="icon icon-lock"><%= l(:text_project_closed) %></span></p>
53
<% end %>
54

    
55
<div class="splitcontentleft">
56
  <% if @project.description.present? %>
57
        <div class="wiki">
58
                <%= textilizable @project.description %>
59
        </div>        
60
  <% end %>
61
        <ul>
62
        <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li><% end %>
63
  <% if @subprojects.any? %>
64
         <li><%=l(:label_subproject_plural)%>:
65
            <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ").html_safe %></li>
66
  <% end %>
67
        <% @project.visible_custom_field_values.each do |custom_value| %>
68
        <% if !custom_value.value.blank? %>
69
           <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
70
        <% end %>
71
        <% end %>
72
        </ul>        
73

    
74
  <% if User.current.allowed_to?(:view_issues, @project) and @open_issues_by_tracker.values.any? %>
75
  <div class="issues box">    
76
    <h3><%=l(:label_issue_tracking)%></h3>
77
    <ul>
78
    <% for tracker in @trackers %>    
79
      <li><%= link_to h(tracker.name), :controller => 'issues', :action => 'index', :project_id => @project, 
80
                                                :set_filter => 1, 
81
                                                "tracker_id" => tracker.id %>:
82
        <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
83
        :total => @total_issues_by_tracker[tracker].to_i) %>
84
      </li>
85
    <% end %>
86
    </ul>
87
    <p>
88
            <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
89
            <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
90
                                | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
91
                        <% end %>
92
                        <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
93
                                | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
94
                        <% end %>
95
                </p>
96
  </div>
97
  <% end %>
98
  <%= call_hook(:view_projects_show_left, :project => @project) %>
99
</div>
100

    
101
<div class="splitcontentright">
102
  
103
  <%= render :partial => 'bibliography_box' %>
104
  
105
  <%= render :partial => 'members_box' %>
106
    
107
  <% if @news.any? && authorize_for('news', 'index') %>
108
  <div class="news box">
109
    <h3><%=l(:label_news_latest)%></h3>  
110
    <%= render :partial => 'news/news', :collection => @news %>
111
    <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
112
  </div>  
113
  <% end %>
114

    
115
  <%= render :partial => 'activities/recent' %>
116

    
117
  <%= call_hook(:view_projects_show_right, :project => @project) %>
118
</div>
119

    
120
<% content_for :sidebar do %>
121
    <%= call_hook(:view_projects_show_sidebar_top, :project => @project) %>
122
    <% if @total_hours.present? && User.current.allowed_to?(:view_time_entries, @project) %>
123
    <h3><%= l(:label_spent_time) %></h3>
124
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
125
    <p>
126
    <% if User.current.allowed_to?(:log_time, @project) %>
127
      <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
128
    <% end %>
129
    <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
130
    <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
131
    <% end %>
132
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
133
<% end %>
134

    
135
<% end %>
136

    
137
<% content_for :header_tags do %>
138
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
139
<% end %>
140

    
141
<% html_title(l(:label_overview)) -%>