summaryrefslogtreecommitdiffstats
path: root/redmine/app/views/layouts/base.rhtml
blob: 21bb036d30183cc1fdfe634a36697f76399981fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>redMine</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="redMine" />
<meta name="keywords" content="issue,bug,tracker" />
<%= stylesheet_link_tag "application" %>
<%= stylesheet_link_tag "rails" %>
<%= javascript_include_tag :defaults %>
</head>

<body>
<div id="container" >

    <div id="header">
    <div style="float: left;">
        <h1><%= RDM_APP_NAME %></h1>
        <h2>Project management</h2>
    </div>
    <div style="float: right; padding-right: 1em; padding-top: 0.2em;">
      <% unless session[:user].nil? %><small><%=_('Logged as')%> <b><%= session[:user].login %></b></small><% end %>
    </div>
    </div> 
	
	<div id="navigation">
		<ul>
			<li class="selected"><%= link_to _('Home'), { :controller => '' }, :class => "picHome" %></li>
			<li><%= link_to _('My page'), { :controller => 'account', :action => 'my_page'}, :class => "picUserPage" %></li>
			<li><%= link_to _('Projects'), { :controller => 'projects' }, :class => "picProject" %></li>
			
			<% unless session[:user].nil? %>
				<li><%= link_to _('My account'), { :controller => 'account', :action => 'my_account' }, :class => "picUser" %></li>
			<% end %>
			
			<% if admin_loggedin? %>
				<li><%= link_to _('Administration'), { :controller => 'admin' }, :class => "picAdmin" %></li>
			<% end %>
			
			<li class="right"><%= link_to _('Help'), { :controller => 'help', :ctrl => @params[:controller], :page => @params[:action] }, :target => "new", :class => "picHelp" %></li>
			<% if session[:user].nil? %>
				<li class="right"><%= link_to _('Log in'), { :controller => 'account', :action => 'login' }, :class => "picUser" %></li>
			<% else %>	
				<li class="right"><%= link_to _('Logout'), { :controller => 'account', :action => 'logout' }, :class => "picUser" %></li>	
			<% end %>
		</ul>
		
	</div>
	
	<div id="subcontent">
	
		<% unless @project.nil? || @project.id.nil? %>
			<h2><%= @project.name %></h2>
			<ul class="menublock">
				<li><%= link_to _('Overview'), :controller => 'projects', :action => 'show', :id => @project %></li>
				<li><%= link_to _('Issues'), :controller => 'projects', :action => 'list_issues', :id => @project %></li>
				<li><%= link_to _('Reports'), :controller => 'reports', :action => 'issue_report', :id => @project %></li>
				<li><%= link_to _('News'), :controller => 'projects', :action => 'list_news', :id => @project %></li>
				<li><%= link_to _('Change log'), :controller => 'projects', :action => 'changelog', :id => @project %></li>
				<li><%= link_to _('Documents'), :controller => 'projects', :action => 'list_documents', :id => @project %></li>
				<li><%= link_to _('Members'), :controller => 'projects', :action => 'list_members', :id => @project %></li>
				<li><%= link_to _('Files'), :controller => 'projects', :action => 'list_files', :id => @project %></li>
				<li><%= link_to_if_authorized _('Settings'), :controller => 'projects', :action => 'settings', :id => @project %></li>
			</ul>
		<% end %>
		
		<% unless session[:user].nil? %>
			<h2><%=_('My projects') %></h2>
			<ul class="menublock">
				<% for membership in session[:user].memberships %>	
					<li><%= link_to membership.project.name, :controller => 'projects', :action => 'show', :id => membership.project %></li>
				<% end %>
			</ul>
		<% end %>
		
	</div>

	<div id="content">
		<% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>		
		<%= @content_for_layout %>	
	</div>
	
	<div id="footer">
		<p><a href="http://redmine.org/" target="_new"><%= RDM_APP_NAME %></a> <%= RDM_APP_VERSION %></p>
	</div>

</div>
</body>
</html>