Advertisement
Guest User

Mantis rhodecode template patch

a guest
Dec 29th, 2011
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 13.11 KB | None | 0 0
  1. # HG changeset patch
  2. # User César Izurieta <cesar@caih.org>
  3. # Date 1322595723 18000
  4. # Node ID ea4da81a56eb7a2c74f1860608506f236861ed5e
  5. # Parent  895fc07e8bdd38d816a8b9bdf74d3876517446ed
  6. [mq]: RhodeCode
  7.  
  8. diff --git a/templates/rhodecode/html_css.tpl b/templates/rhodecode/html_css.tpl
  9. new file mode 100644
  10. --- /dev/null
  11. +++ b/templates/rhodecode/html_css.tpl
  12. @@ -0,0 +1,9 @@
  13. +
  14. +   <link rel="stylesheet" type="text/css" href="{$path}css/{config_get option='css_include_file'}" />
  15. +   <link rel="stylesheet" type="text/css" href="{$path}css/jquery-ui.css" />
  16. +   <link rel="stylesheet" type="text/css" href="{$path}css/common_config.php" />
  17. +   <link rel="stylesheet" type="text/css" href="{$path}css/status_config.php" />
  18. +   {* Add right-to-left css if needed *}
  19. +   {if $directionality == 'rtl'}<link rel="stylesheet" type="text/css" href="{$path}css/{config_get option='css_rtl_include_file'|escape:'html'}" />{/if}
  20. +   {foreach from=$g_stylesheets_included item=t_stylesheet_path }<link rel="stylesheet" type="text/css" href="{$path}css/{$t_stylesheet_path|escape:'html'}" />{/foreach}
  21. +
  22. diff --git a/templates/rhodecode/html_footer.tpl b/templates/rhodecode/html_footer.tpl
  23. new file mode 100644
  24. --- /dev/null
  25. +++ b/templates/rhodecode/html_footer.tpl
  26. @@ -0,0 +1,33 @@
  27. +<div id="footer">
  28. +   <div id="footer-inner" class="title">
  29. +   <div id="footer">
  30. +   <p class="footer-link">
  31. +       {* Show optional user-specificed custom copyright statement *}
  32. +       {if $copyright_statement}
  33. +       <address id="user-copyright">$t_copyright_statement</address>
  34. +       {/if}
  35. +
  36. +       {* Show MantisBT version and copyright statement *}
  37. +       <address id="mantisbt-copyright">Powered by <a href="http://www.mantisbt.org" title="Mantis Bug Tracker: a free and open source web based bug tracking system.">Mantis Bug Tracker</a> (MantisBT){$t_version_suffix}. Copyright &copy;{$t_copyright_years} MantisBT contributors. Licensed under the terms of the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" title="GNU General Public License (GPL) version 2">GNU General Public License (GPL) version 2</a> or a later version.</address>
  38. +
  39. +       {* Show contact information *}
  40. +       <address id="webmaster-contact-information">{lang_get string='webmaster_contact_information'}{config_get option='webmaster_email'}</address>
  41. +   </p>
  42. +   <p class="footer-link-right">
  43. +       <div id="powered-by-mantisbt-logo">
  44. +           <a href="http://www.mantisbt.org" title="Mantis Bug Tracker: a free and open source web based bug tracking system."><img src="{$short_path}images/mantis_logo_button.gif" width="88" height="35" alt="Powered by Mantis Bug Tracker: a free and open source web based bug tracking system." /></a>
  45. +       </div>
  46. +   </p>
  47. +   </div>
  48. +   </div>
  49. +</div>
  50. +
  51. +
  52. +{if $t_page_execution_time}<p id="page-execution-time">$t_page_execution_time</p>{/if}
  53. +{if $t_page_memory_usage}<p id="page-memory-usage">$t_page_memory_usage</p>{/if}
  54. +{if $t_total_queries_executed}<p id="total-queries-count">$t_total_queries_executed</p>{/if}
  55. +{if $t_unique_queries_executed}<p id="unique-queries-count">$t_unique_queries_executed</p>{/if}
  56. +{if $t_total_query_time}<p id="total-query-execution-time">$t_total_query_time</p>{/if}
  57. +
  58. +{$log_events}
  59. +
  60. diff --git a/templates/rhodecode/html_head_javascript.tpl b/templates/rhodecode/html_head_javascript.tpl
  61. new file mode 100644
  62. --- /dev/null
  63. +++ b/templates/rhodecode/html_head_javascript.tpl
  64. @@ -0,0 +1,10 @@
  65. +
  66. +   <script type="text/javascript" src="{$short_path}/javascript_config.php"></script>
  67. +   <script type="text/javascript" src="{$short_path}/javascript_translations.php"></script>
  68. +   <script type="text/javascript" src="{$short_path}/javascript/jquery.js"></script>
  69. +   <script type="text/javascript" src="{$short_path}/javascript/jquery-ui.js"></script>
  70. +   <script type="text/javascript" src="{$short_path}/javascript/common.js"></script>
  71. +   {foreach from=$g_scripts_included item=p_filename}
  72. +   <script type="text/javascript" src="{$short_path}/javascript/{$p_filename|escape:'html'}"></script>
  73. +   {/foreach}
  74. +
  75. diff --git a/templates/rhodecode/html_login_info.tpl b/templates/rhodecode/html_login_info.tpl
  76. new file mode 100644
  77. --- /dev/null
  78. +++ b/templates/rhodecode/html_login_info.tpl
  79. @@ -0,0 +1,64 @@
  80. +    <!-- user -->
  81. +    <ul id="logged-user">
  82. +         <li class="first">
  83. +
  84. +       {if current_user_is_anonymous() }
  85. +       <div id="quick_login" style="display:none">
  86. +           <form action="/_admin/login?came_from=%2F" method="post">
  87. +           <div class="form">
  88. +               <div class="fields">
  89. +                   <div class="field">
  90. +                       <div class="label">
  91. +                           <label for="username">Username:</label>
  92. +                       </div>
  93. +                       <div class="input">
  94. +                           <input class="focus" id="username" name="username" size="40" type="text" />
  95. +                       </div>
  96. +                      
  97. +                   </div>                    
  98. +                   <div class="field">
  99. +                       <div class="label">
  100. +                           <label for="password">Password:</label>
  101. +                       </div>
  102. +                       <div class="input">
  103. +                           <input class="focus" id="password" name="password" size="40" type="password" />
  104. +                       </div>
  105. +                      
  106. +                   </div>
  107. +                   <div class="buttons">
  108. +                       <div class="password_forgoten"><a href="/_admin/password_reset">Forgot password ?</a></div>
  109. +                        <div class="register">
  110. +                         <a href="{$path}signup_page.php">Don&#39;t have an account ?</a>
  111. +                        </div>
  112. +               {if $allow_signup}
  113. +               <span id="signup-link"><a href="{$path}signup_page.php">{lang_get string='signup_link'}</a></span>
  114. +               {/if}
  115. +                   </div>
  116. +               </div>
  117. +           </div>
  118. +           </form>
  119. +       </div>        
  120. +       {/if}
  121. +        
  122. +             <div class="gravatar">
  123. +                 <img alt="gravatar" src="http://www.gravatar.com/avatar/XXX?s=20&amp;d=identicon" />
  124. +             </div>
  125. +          <div class="account">
  126. +       {if current_user_is_anonymous() }
  127. +           <a href="{$path}login_page.php?return={$t_return_page}" title="RhodeCode Admin">{lang_get string='anonymous'}</a>
  128. +       {else}
  129. +           <a href="{$path}account_page.php" title="{$t_realname|escape:'html'}">{$t_username}</a>
  130. +       {/if}
  131. +          </div>  
  132. +         </li>
  133. +         <li>
  134. +            <a href="{$short_path}main_page.php">{lang_get string='main_link'}</a>
  135. +         </li>
  136. +         <li>
  137. +            <a href="{$rhodecode_path}">RhodeCode</a>
  138. +         </li>
  139. +                <li class="last highlight"><a id="logout-link" href="{$short_path}logout_page.php">{lang_get string='logout_link'}</a></li>
  140. +    </ul>
  141. +    <!-- end user -->
  142. +
  143. +
  144. diff --git a/templates/rhodecode/html_menu.tpl b/templates/rhodecode/html_menu.tpl
  145. new file mode 100644
  146. --- /dev/null
  147. +++ b/templates/rhodecode/html_menu.tpl
  148. @@ -0,0 +1,46 @@
  149. +        <!-- box / title -->
  150. +        <div class="title">
  151. +                <ul class="links">
  152. +       {foreach from=$t_menu_plugin_pre_options item=t_menu_option}
  153. +       <li>
  154. +                    <span>{$t_menu_option}</span>
  155. +       </li>
  156. +       {/foreach}
  157. +       {foreach from=$t_menu_options item=t_menu_option}
  158. +       <li>
  159. +                    <span>{$t_menu_option}</span>
  160. +       </li>
  161. +       {/foreach}
  162. +       {foreach from=$t_menu_plugin_post_options item=t_menu_option}
  163. +       <li>
  164. +                    <span>{$t_menu_option}</span>
  165. +       </li>
  166. +       {/foreach}
  167. +                </ul>          
  168. +        </div>
  169. +        <!-- end box / title -->
  170. +
  171. +        {if $t_show_project_selector }
  172. +        <form method="post" id="form-set-project" action="{$short_path}set_project.php">
  173. +                <fieldset id="project-selector">
  174. +                        {* CSRF protection not required here - form does not result in modifications *}
  175. +                        <label for="form-set-project-id">{lang_get string='email_project'}</label>
  176. +                        <select id="form-set-project-id" name="project_id">
  177. +                                {$project_option_list}
  178. +                        </select>
  179. +                        <input type="submit" class="button" value="{lang_get string='switch'}" />
  180. +                </fieldset>
  181. +        </form>
  182. +        {/if}
  183. +
  184. +   {if auth_is_user_authenticated()}
  185. +   <form method="post" action="{$short_path}jump_to_bug.php" class="bug-jump-form">
  186. +       <fieldset class="bug-jump">
  187. +           {* CSRF protection not required here - form does not result in modifications *}
  188. +           <input type="hidden" name="bug_label" value="{lang_get string='issue_id'}" />
  189. +           <input type="text" name="bug_id" size="10" class="small" />
  190. +           <input type="submit" class="button-small" value="{lang_get string='jump'}" />
  191. +       </fieldset>
  192. +   </form>
  193. +   {/if}
  194. +
  195. diff --git a/templates/rhodecode/html_top_banner.tpl b/templates/rhodecode/html_top_banner.tpl
  196. new file mode 100644
  197. --- /dev/null
  198. +++ b/templates/rhodecode/html_top_banner.tpl
  199. @@ -0,0 +1,15 @@
  200. +
  201. +   {if $t_page }
  202. +       {include_php file=$t_page};
  203. +   {elseif $t_show_logo }
  204. +   <div id="banner">
  205. +       {if $t_show_url }
  206. +       <a id="logo-link" href="{config_get option='logo_url'|escape:'html'}">
  207. +       {/if}
  208. +       <img id="logo-image" alt="Mantis Bug Tracker" src="{$path}{config_get option='logo_image'|escape:'html'}" />
  209. +       {if $t_show_url}
  210. +       </a>
  211. +       {/if}
  212. +   </div>
  213. +   {/if}
  214. +
  215. diff --git a/templates/rhodecode/main.tpl b/templates/rhodecode/main.tpl
  216. new file mode 100644
  217. --- /dev/null
  218. +++ b/templates/rhodecode/main.tpl
  219. @@ -0,0 +1,106 @@
  220. +{assign var='rhodecode_path' value='https://hg.fit-bank.com/'}
  221. +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  222. +<html xmlns="http://www.w3.org/1999/xhtml">
  223. +    <head>
  224. +        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  225. +        <meta name="robots" content="index, nofollow"/>
  226. +        <link rel="icon" href="/images/icons/database_gear.png" type="image/png" />
  227. +
  228. +        <link rel="stylesheet" type="text/css" href="{$rhodecode_path}/css/style.css" media="screen"/>
  229. +        <link rel="stylesheet" type="text/css" href="{$rhodecode_path}/css/pygments.css"/>
  230. +        <link rel="stylesheet" type="text/css" href="{$rhodecode_path}/css/diff.css"/>
  231. +        {include file='html_css.tpl'}
  232. +            
  233. +        <meta http-equiv="Content-type" content="application/xhtml+xml; charset=UTF-8" />
  234. +        {include_php file=$meta_include_file}
  235. +
  236. +        {if $g_robots_meta}<meta name="robots" content="{$g_robots_meta}" />{/if}
  237. +
  238. +        {if $g_rss_feed_url}<link rel="alternate" type="application/rss+xml" title="RSS" href="{$g_rss_feed_url}" />{/if}
  239. +
  240. +        {if $t_favicon_image}<link rel="shortcut icon" href="{$short_path}{$t_favicon_image}" type="image/x-icon" />{/if}
  241. +
  242. +        <link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Text Search" href="{$path}/browser_search_plugin.php?type=text" />
  243. +        <link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Issue Id" href="{$path}/browser_search_plugin.php?type=id" />
  244. +
  245. +        <title>{$t_title}</title>
  246. +
  247. +        {include file='html_head_javascript.tpl'}
  248. +
  249. +        {if $t_url}
  250. +        <meta http-equiv="Refresh" content="{$p_time};URL={$t_url}" />
  251. +        {/if}
  252. +
  253. +    </head>
  254. +<body id="body">
  255. +        
  256. +
  257. +<!-- HEADER -->
  258. +<div id="header">
  259. +    {include file='html_login_info.tpl'}
  260. +
  261. +    <div id="header-inner" class="title">
  262. +        <div id="logo">
  263. +            <h1><a href="/">Fitbank Mantis</a></h1>
  264. +        </div>
  265. +
  266. +        <!-- MENU -->
  267. +        <ul id="quick">
  268. +        {if $rss_enabled}
  269. +        <li>
  270. +               <a title="{lang_get string='change_preferences_link'}">
  271. +                    <span class="icon">
  272. +                        <img src="{$rhodecode_path}images/icons/cog_edit.png" alt="{lang_get string='change_preferences_link'}" title="{lang_get string='change_preferences_link'}" />
  273. +                    </span>
  274. +                    <span>{lang_get string='change_preferences_link'}</span>
  275. +                </a>
  276. +                <ul>
  277. +               {foreach from=$t_menu_extra_options item=t_menu_option}
  278. +               <li>{$t_menu_option}</li>
  279. +               {/foreach}
  280. +               </ul>
  281. +       </li>
  282. +        <li>
  283. +                {* Link to RSS issues feed for the selected project, including authentication details. *}
  284. +                <a title="{lang_get string='rss'}" href="{$rss_get_issues_feed_url|escape:'html'}">
  285. +                    <span class="icon">
  286. +                        <img src="{$short_path}/images/rss.png" alt="{lang_get string='rss'}" title="{lang_get string='rss'}" />
  287. +                    </span>
  288. +                    <span>{lang_get string='rss'}</span>
  289. +                </a>
  290. +        </li>
  291. +        {/if}
  292. +        </ul>
  293. +        <!-- END MENU -->
  294. +    </div>
  295. +</div>    
  296. +<!-- END HEADER -->
  297. +    
  298. +<!-- CONTENT -->
  299. +<div id="mantis">
  300. +<div id="content">
  301. +    <div class="flash_msg">
  302. +        
  303. +    </div>            
  304. +    <div id="main">
  305. +        
  306. +            
  307. +    <div class="box">
  308. +        {include file='html_menu.tpl'}
  309. +
  310. +        <div id="content">
  311. +                {$content}
  312. +        </div>
  313. +
  314. +    </div>
  315. +</div>
  316. +</div>
  317. +</div>
  318. +<!-- END CONTENT -->
  319. +
  320. +<!-- FOOTER -->
  321. +{include file='html_footer.tpl'}
  322. +<!-- END FOOTER -->
  323. +
  324. +    </body>
  325. +</html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement