0fa5d70e91f4b1071e35f7a969389d4c7ee24972
[timetracker.git] / WEB-INF / templates / header.tpl
1 <html>
2 <head>
3   <meta http-equiv="content-type" content="text/html; charset={$smarty.const.CHARSET}">
4   <link rel="icon" href="favicon.ico" type="image/x-icon">
5   <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
6   <link href="{$smarty.const.DEFAULT_CSS}" rel="stylesheet" type="text/css">
7 {if $i18n.language.rtl}
8   <link href="{$smarty.const.RTL_CSS}" rel="stylesheet" type="text/css">
9 {/if}
10   <title>Time Tracker{if $title} - {$title}{/if}</title>
11   <script src="js/strftime.js"></script>
12   <script>
13     {* Setup locale for strftime *}
14     {$js_date_locale}
15   </script>
16   <script src="js/strptime.js"></script>
17 </head>
18
19 <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" {$onload}>
20
21 {assign var="tab_width" value="700"}
22
23 <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
24   <tr>
25     <td valign="top" align="center"> <!-- This is to centrally align all our content. -->
26
27       <!-- top image -->
28       <table cellspacing="0" cellpadding="0" width="100%" border="0">
29         <tr>
30 {if $user->custom_logo}
31           <td align="center">
32 {else}
33           <td bgcolor="#a6ccf7" background="images/top_bg.gif" align="center">
34 {/if}
35             <table cellspacing="0" cellpadding="0" width="{$tab_width}" border="0">
36               <tr>
37                 <td valign="top">
38                   <table id="page_logo" cellspacing="0" cellpadding="0" width="100%" border="0">
39                     <tr><td height="6" colspan="2"><img width="1" height="6" src="images/1x1.gif" border="0"></td></tr>
40                     <tr valign="top">
41 {if $user->custom_logo}
42                       <td height="55" align="center"><img alt="Time Tracker" width="300" height="43" src="{$custom_logo}" border="0"></td>
43 {else}
44                       <td height="55" align="center"><a href="https://www.anuko.com/lp/tt_1.htm" target="_blank"><img alt="Anuko Time Tracker" width="300" height="43" src="images/tt_logo.png" border="0"></a></td>
45 {/if}
46                     </tr>
47                   </table>
48                 </td>
49               </tr>
50             </table>
51           </td>
52         </tr>
53       </table>
54       <!-- end of top image -->
55
56 {if $authenticated}
57   {if $user->can('administer_site')}
58       <!-- top menu for admin -->
59       <table id="top_menu_admin" cellspacing="0" cellpadding="3" width="100%" border="0">
60         <tr>
61           <td class="systemMenu" height="17" align="center">&nbsp;
62             <a class="systemMenu" href="logout.php">{$i18n.menu.logout}</a> &middot;
63             <a class="systemMenu" href="{$smarty.const.FORUM_LINK}" target="_blank">{$i18n.menu.forum}</a> &middot;
64             <a class="systemMenu" href="{$smarty.const.HELP_LINK}" target="_blank">{$i18n.menu.help}</a>
65           </td>
66         </tr>
67       </table>
68       <!-- end of top menu for admin -->
69
70       <!-- sub menu for admin -->
71       <table id="sub_menu_admin" cellspacing="0" cellpadding="3" width="100%" border="0">
72         <tr>
73           <td align="center" bgcolor="#d9d9d9" nowrap height="17" background="images/subm_bg.gif">&nbsp;
74             <a class="mainMenu" href="admin_groups.php">{$i18n.menu.groups}</a> &middot;
75             <a class="mainMenu" href="admin_options.php">{$i18n.menu.options}</a>
76           </td>
77         </tr>
78       </table>
79       <!-- end of sub menu for admin -->
80   {else}
81       <!-- top menu for authorized user -->
82       <table id="top_menu_authorized_user" cellspacing="0" cellpadding="3" width="100%" border="0">
83         <tr>
84           <td class="systemMenu" height="17" align="center">&nbsp;
85             <a class="systemMenu" href="logout.php">{$i18n.menu.logout}</a> &middot;
86     {if $user->exists() && $user->can('manage_own_settings')}
87             <a class="systemMenu" href="profile_edit.php">{$i18n.menu.profile}</a> &middot;
88     {/if}
89     {if $user->can('manage_basic_settings')}
90             <a class="systemMenu" href="group_edit.php">{$i18n.menu.group}</a> &middot;
91     {/if}
92     {if $user->can('manage_subgroups')}
93             <a class="systemMenu" href="groups.php">{$i18n.menu.subgroups}</a> &middot;
94     {/if}
95     {if $user->can('manage_features')}
96             <a class="systemMenu" href="plugins.php">{$i18n.menu.plugins}</a> &middot;
97     {/if}
98             <a class="systemMenu" href="{$smarty.const.FORUM_LINK}" target="_blank">{$i18n.menu.forum}</a> &middot;
99             <a class="systemMenu" href="{$smarty.const.HELP_LINK}" target="_blank">{$i18n.menu.help}</a>
100           </td>
101         </tr>
102       </table>
103       <!-- end of top menu for authorized user -->
104
105       <!-- sub menu for authorized user -->
106       <table id="sub_menu_authorized_user" cellspacing="0" cellpadding="3" width="100%" border="0">
107         <tr>
108           <td align="center" bgcolor="#d9d9d9" nowrap height="17" background="images/subm_bg.gif">&nbsp;
109     {if $user->exists() && ($user->can('track_own_time') || $user->can('track_time'))}
110            <a class="mainMenu" href="time.php">{$i18n.menu.time}</a>
111     {/if}
112     {if $user->exists() && $user->isPluginEnabled('ex') && ($user->can('track_own_expenses') || $user->can('track_expenses'))}
113             &middot; <a class="mainMenu" href="expenses.php">{$i18n.menu.expenses}</a>
114     {/if}
115     {if $user->exists() && ($user->can('view_own_reports') || $user->can('view_reports') || $user->can('view_all_reports') || $user->can('view_client_reports'))}
116       {if !$user->isClient()}&middot;{/if} <a class="mainMenu" href="reports.php">{$i18n.menu.reports}</a>
117     {/if}
118     {if $user->exists() && $user->isPluginEnabled('ts') && ($user->can('track_own_time') || $user->can('track_time'))}
119             &middot; <a class="mainMenu" href="timesheets.php">{$i18n.menu.timesheets}</a>
120     {/if}
121     {if $user->exists() && $user->isPluginEnabled('iv') && ($user->can('manage_invoices') || $user->can('view_client_invoices'))}
122             &middot; <a class="mainMenu" href="invoices.php">{$i18n.title.invoices}</a>
123     {/if}
124     {if ($user->exists() && $user->isPluginEnabled('ch') && ($user->can('view_own_charts') || $user->can('view_charts'))) &&
125         ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() ||
126         $user->isPluginEnabled('cl'))}
127             &middot; <a class="mainMenu" href="charts.php">{$i18n.menu.charts}</a>
128     {/if}
129     {if ($user->can('view_own_projects') || $user->can('manage_projects')) && ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode())}
130             &middot; <a class="mainMenu" href="projects.php">{$i18n.menu.projects}</a>
131     {/if}
132     {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && ($user->can('view_own_tasks') || $user->can('manage_tasks')))}
133             &middot; <a class="mainMenu" href="tasks.php">{$i18n.menu.tasks}</a>
134     {/if}
135     {if $user->can('view_users') || $user->can('manage_users')}
136             &middot; <a class="mainMenu" href="users.php">{$i18n.menu.users}</a>
137     {/if}
138     {if $user->isPluginEnabled('cl') && ($user->can('view_own_clients') || $user->can('manage_clients'))}
139             &middot; <a class="mainMenu" href="clients.php">{$i18n.menu.clients}</a>
140     {/if}
141     {if $user->isPluginEnabled('wk') && ($user->can('do_work') || $user->can('bid_on_work') || $user->can('manage_work')) && $user->exists()}
142             &middot; <a class="mainMenu" href="work.php">{$i18n.title.work}</a>
143     {/if}
144     {if $user->can('export_data')}
145             &middot; <a class="mainMenu" href="export.php">{$i18n.menu.export}</a>
146     {/if}
147           </td>
148         </tr>
149       </table>
150       <!-- end of sub menu for authorized user -->
151   {/if}
152 {else}
153       <!-- top menu for non authorized user -->
154       <table id="top_menu_non_authorized_user" cellspacing="0" cellpadding="3" width="100%" border="0">
155         <tr>
156           <td class="systemMenu" height="17" align="center">&nbsp;
157             <a class="systemMenu" href="login.php">{$i18n.menu.login}</a> &middot;
158   {if isTrue('MULTITEAM_MODE') && $smarty.const.AUTH_MODULE == 'db'}
159             <a class="systemMenu" href="register.php">{$i18n.menu.create_group}</a> &middot;
160   {/if}
161             <a class="systemMenu" href="{$smarty.const.FORUM_LINK}" target="_blank">{$i18n.menu.forum}</a> &middot;
162             <a class="systemMenu" href="{$smarty.const.HELP_LINK}" target="_blank">{$i18n.menu.help}</a>
163           </td>
164         </tr>
165       </table>
166 {/if}
167       <br>
168
169       <!-- page title and user details -->
170 {if $title}
171       <table id="page_title" cellspacing="0" cellpadding="5" width="{$tab_width+20}" border="0">
172         <tr><td class="sectionHeader"><div class="pageTitle">{$title}{if $timestring}: {$timestring}{/if}</div></td></tr>
173         <tr><td>{$user->getUserPartForHeader()}</td></tr> {* No need to escape as it is done in the class. *}
174       </table>
175 {/if}
176       <!-- end of page title and user details -->
177
178       <!-- output errors -->
179 {if $err->yes()}
180       <table id="page_errors" cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
181         <tr>
182           <td class="error">
183   {foreach $err->getErrors() as $error}
184             {$error.message}<br> {* No need to escape as they are not coming from user and may contain a link. *}
185   {/foreach}
186           </td>
187         </tr>
188       </table>
189 {/if}
190       <!-- end of output errors -->
191
192       <!-- output messages -->
193 {if $msg->yes()}
194       <table id="page_messages" cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
195         <tr>
196           <td class="info_message">
197   {foreach $msg->getErrors() as $message}
198             {$message.message}<br> {* No need to escape. *}
199   {/foreach}
200           </td>
201         </tr>
202       </table>
203 {/if}
204       <!-- end of output messages -->