Changeset - 1ac47c961f70
[Not reviewed]
beta
0 4 0
Marcin Kuzminski - 13 years ago 2013-01-23 22:03:39
marcin@python-works.com
Set current pages indication for search and journal
4 files changed with 8 insertions and 7 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/base/base.html
Show inline comments
 
@@ -135,25 +135,26 @@
 
      </div>
 
  </div>
 

	
 
    </li>
 
</%def>
 

	
 
<%def name="menu(current=None)">
 
        <%
 
        def is_current(selected):
 
            if selected == current:
 
                return h.literal('class="current"')
 
        %>
 
        %if current not in ['home','admin']:
 
        ## we render this menu only not for those pages 
 
        %if current not in ['home','admin', 'search', 'journal']:
 
            ##REGULAR MENU
 
            <ul id="quick">
 
                <!-- repo switcher -->
 
                <li>
 
                    <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#">
 
                    <span class="icon">
 
                        <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" />
 
                    </span>
 
                    <span>${_('Repositories')}</span>
 
                    </a>
 
                    <ul id="repo_switcher_list" class="repo_switcher">
 
                        <li>
 
@@ -317,43 +318,43 @@
 
        %else:
 
            ##ROOT MENU
 
            <ul id="quick">
 
                <li ${is_current('home')}>
 
                    <a class="menu_link" title="${_('Home')}"  href="${h.url('home')}">
 
                    <span class="icon">
 
                        <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" />
 
                    </span>
 
                    <span>${_('Home')}</span>
 
                    </a>
 
                </li>
 
                %if c.rhodecode_user.username != 'default':
 
                 <li>
 
                 <li ${is_current('journal')}>
 
                    <a class="menu_link" title="${_('Journal')}"  href="${h.url('journal')}">
 
                    <span class="icon">
 
                        <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" />
 
                    </span>
 
                    <span>${_('Journal')}</span>
 
                    </a>
 
                 </li>
 
                %else:
 
                 <li>
 
                 <li ${is_current('journal')}>
 
                    <a class="menu_link" title="${_('Public journal')}"  href="${h.url('public_journal')}">
 
                    <span class="icon">
 
                        <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" />
 
                    </span>
 
                    <span>${_('Public journal')}</span>
 
                    </a>
 
                 </li>
 
                %endif
 
                <li>
 
                <li ${is_current('search')}>
 
                    <a class="menu_link" title="${_('Search')}"  href="${h.url('search')}">
 
                    <span class="icon">
 
                        <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" />
 
                    </span>
 
                    <span>${_('Search')}</span>
 
                    </a>
 
                </li>
 

	
 
                %if h.HasPermissionAll('hg.admin')('access admin main page'):
 
                <li ${is_current('admin')}>
 
                   <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}">
 
                   <span class="icon">
rhodecode/templates/journal/journal.html
Show inline comments
 
@@ -6,25 +6,25 @@
 
<%def name="breadcrumbs()">
 
    <h5>
 
    <form id="filter_form">
 
    <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/>
 
    <span class="tooltip" title="${h.tooltip(h.journal_filter_help())}">?</span>
 
    <input type='submit' value="${_('filter')}" class="ui-btn" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('journal')} - ${ungettext('%s entry', '%s entries', c.journal_pager.item_count) % (c.journal_pager.item_count)}
 
    </form>
 
    ${h.end_form()}
 
    </h5>
 
</%def>
 
<%def name="page_nav()">
 
    ${self.menu('home')}
 
    ${self.menu('journal')}
 
</%def>
 
<%def name="head_extra()">
 
<link href="${h.url('journal_atom', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
 
<link href="${h.url('journal_rss', api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
 
</%def>
 
<%def name="main()">
 

	
 
    <div class="box box-left">
 
        <!-- box / title -->
 
        <div class="title">
 
         ${self.breadcrumbs()}
 
         <ul class="links">
rhodecode/templates/journal/public_journal.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 
<%def name="title()">
 
    ${_('Journal')} - ${c.rhodecode_name}
 
</%def>
 
<%def name="breadcrumbs()">
 
    ${c.rhodecode_name}
 
</%def>
 
<%def name="page_nav()">
 
    ${self.menu('home')}
 
    ${self.menu('journal')}
 
</%def>
 
<%def name="head_extra()">
 
<link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" />
 
<link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" />
 
</%def>
 
<%def name="main()">
 

	
 
<div class="box">
 
  <!-- box / title -->
 
  <div class="title">
 
    <h5>${_('Public Journal')}</h5>
 
      <ul class="links">
rhodecode/templates/search/search.html
Show inline comments
 
@@ -11,25 +11,25 @@
 
    %if c.repo_name:
 
        ${_('Search in repository: %s') % c.repo_name}
 
    %else:
 
        ${_('Search in all repositories')}
 
    %endif
 
   %endif
 
    - ${c.rhodecode_name}
 
</%def>
 
<%def name="breadcrumbs()">
 
    ${c.rhodecode_name}
 
</%def>
 
<%def name="page_nav()">
 
    ${self.menu('home')}
 
    ${self.menu('search')}
 
</%def>
 
<%def name="main()">
 

	
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        <h5>
 
        %if c.repo_name:
 
            ${_('Search in repository: %s') % c.repo_name}
 
        %else:
 
            ${_('Search in all repositories')}
 
        %endif
0 comments (0 inline, 0 general)