<!-- $Id: nav.tt2 12736 2016-03-14 03:11:02Z sikeda $ -->
[% IF action == 'create_list_request' %]
[% IF all_lists.size > 0 ~%]
[%# Remove the class "menu-icon" to get rid of menu icon.
    Take out inner text of span element to just have icon alone. ~%]
<nav class="top-bar" data-topbar role="navigation">
    <ul class="title-area">
        <li class="name">
        </li>
        <li class="toggle-topbar menu-icon"><a href="#"><span>[%|loc%]Create List Menu[%END%]</span></a></li>
    </ul>
<menu class="top-bar-section">
    <ul class="left">
        <li><a href="#list_create">[%|loc%]Create a list using a template[%END%]</a></li>
        <li class="divider"></li>
        <li><a href="#list_copy">[%|loc%]Copy an existing list.[%END%]</a></li>
    </ul>
</menu>
</nav>
[%~ END %]
[% END %]

[% IF action == 'serveradmin' or action == 'skinsedit'  or action == 'edit_config' or action == 'get_pending_lists'  or action == 'get_closed_lists'  or action == 'get_latest_lists'   or action == 'get_inactive_lists' %]
[%# Remove the class "menu-icon" to get rid of menu icon.
    Take out inner text of span element to just have icon alone. ~%]
<nav class="top-bar" data-topbar role="navigation">
    <ul class="title-area">
        <li class="name">
        </li>
        <li class="toggle-topbar menu-icon"><a href="#"><span>[%|loc%]Listmaster Admin Menu[%END%]</span></a></li>
    </ul>
<menu class="top-bar-section">
  <ul class="left">
[% IF (subaction == '' or subaction == 'm_lists') and action != 'skinsedit' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="has-dropdown [% class %]"><a href="[% 'serveradmin/m_lists' | url_rel %]">[%|loc%]Lists[%END%]</a>
       <ul class="dropdown">
          <li><a href="[% 'get_pending_lists' | url_rel %]">[%|loc%]View Pending (Requested) lists[%END%]</a></li>
          <li><a href="[% 'get_closed_lists' | url_rel %]">[%|loc%]View Closed Lists[%END%]</a></li>
          <li><a href="[% 'get_latest_lists' | url_rel %]">[%|loc%]View Lists sorted by Creation Date[%END%]</a></li>
          <li><a href="[% 'get_inactive_lists' | url_rel %]">[%|loc%]View Lists sorted by Last Message Date[%END%]</a></li>
       </ul>
</li>
[% IF subaction == 'users' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/users' | url_rel %]">[%|loc%]Users[%END%]</a></li>
[% IF subaction == 'archives' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/archives' | url_rel %]">[%|loc%]Archives[%END%]</a></li>
[% IF subaction == 'logs' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/logs' | url_rel %]">[%|loc%]System log[%END%]</a></li>
[% IF subaction == 'templates' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/templates' | url_rel %]">[%|loc%]Templates[%END%]</a></li>
[% IF action == 'skinsedit' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'skinsedit' | url_rel %]">[%|loc%]Skins, CSS and colors[%END%]</a></li>
[% IF main_robot %]
[% IF subaction == 'vhosts' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/vhosts' | url_rel %]">[%|loc%]Virtual Robots[%END%]</a></li>
[% IF action == 'edit_config' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'edit_config' | url_rel %]">[%|loc%]Edit Robot Config[%END%]</a></li>
[% END %]
[% IF families -%]
[% IF subaction == 'families' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/families' | url_rel %]">[%|loc%]Families[%END%]</a></li>
[% END %]
[% IF subaction == 'translation' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/translation' | url_rel %]">[%|loc%]Translating Sympa[%END%]</a></li>
[% IF subaction == 'tracker' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'serveradmin/tracker' | url_rel %]">[%|loc%]Submitting a bug, a feature request[%END%]</a></li>
  </ul>
</menu>
</nav>
[% END %]

[% IF action == 'lists' %]
<h2>[%|loc%]Index of lists[%END%]</h2>
[%# Remove the class "menu-icon" to get rid of menu icon.
    Take out inner text of span element to just have icon alone. ~%]
[% letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','others' ] %]
<nav class="top-bar" data-topbar role="navigation">
    <ul class="title-area">
        <li class="name">
        </li>
        <li class="toggle-topbar menu-icon"><a href="#"><span>[%|loc%]Index of lists[%END%]</span></a></li>
    </ul>
<menu class="top-bar-section">
  <ul class="left">
[% FOREACH letter IN letters %]
  [% IF orderedlist.$letter.0 %]
    <li class="letter"><a href="#[%letter%]">[%IF letter == 'others'%][%|loc%]others[%END%][%ELSE%][%letter%][%END%]</a></li>
  [% ELSE %]
    <li class="nolink letter">[%IF letter == 'others'%][%|loc%]others[%END%][%ELSE%][%letter%][%END%]</li>
 [% END %] 
[% END %]
 <li class="letter">
  [% topic_paths = [];
     IF topic;
       topic_paths.push(topic);
       IF subtopic; topic_paths.push(subtopic); END;
     END;
  ~%]
  <a href="[% 'lists' | url_rel(topic_paths) %]" onclick="show('loading'); hide('content-inner');">[%|loc%]All[%END%]</a> </li>
  </ul>
</menu>
</nav>
[% END %]

[% IF action == 'admin' || action_type == 'admin' || action == 'editfile' %]
<h2>[%|loc%]Basic Operations[%END%]</h2>
[%# Remove the class "menu-icon" to get rid of menu icon.
    Take out inner text of span element to just have icon alone. ~%]
<nav class="top-bar" data-topbar role="navigation">
    <ul class="title-area">
        <li class="name">
        </li>
        <li class="toggle-topbar menu-icon"><a href="#"><span>[%|loc%]Menu[%END%]</span></a></li>
    </ul>
<menu class="top-bar-section">
  <ul class="left">
[% IF action == 'edit_list_request' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="has-dropdown [% class %]"><a  href="[% 'edit_list_request' | url_rel([list,'description']) %]">[%|loc%]Edit List Config[%END%]</a>
        <ul class="dropdown">
        [% IF group == 'description' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a  href="[% 'edit_list_request' | url_rel([list,'description']) %]" >[%|loc%]List definition[%END%]</a></li>
        [% IF group == 'sending' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a href="[% 'edit_list_request' | url_rel([list,'sending']) %]" >[%|loc%]Sending/receiving setup[%END%]</a></li>
        [% IF group == 'command' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a href="[% 'edit_list_request' | url_rel([list,'command']) %]" >[%|loc%]Privileges[%END%]</a></li>
        [% IF group == 'archives' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a href="[% 'edit_list_request' | url_rel([list,'archives']) %]" >[%|loc%]Archives[%END%]</a></li>
        [% IF group == 'bounces' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a href="[% 'edit_list_request' | url_rel([list,'bounces']) %]" >[%|loc%]Bounces[%END%]</a></li>
        [% IF group == 'data_source' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a href="[% 'edit_list_request' | url_rel([list,'data_source']) %]" >[%|loc%]Data sources setup[%END%]</a></li>
        [% IF group == 'dkim' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a href="[% 'edit_list_request' | url_rel([list,'dkim']) %]" >[%|loc%]DKIM[%END%]</a></li>
        [% IF action == 'editfile' && selected_file == 'description_templates' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
            <li class="[% class %]"><a href="[% 'editfile' | url_rel([list,'description_templates']) %]">[%|loc%]List description/homepage[%END%]</a></li>
        [% IF action == 'editfile' && selected_file == 'message_templates' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
            <li class="[% class %]"><a href="[% 'editfile' | url_rel([list,'message_templates']) %]">[%|loc%]Message templates[%END%]</a></li>
        [% IF group == 'other' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
             <li class="[% class %]"><a href="[% 'edit_list_request' | url_rel([list,'other']) %]" >[%|loc%]Miscellaneous[%END%]</a></li>
          </ul>
    </li>
[% IF is_owner %]
[% IF action == 'review' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a  href="[% 'review' | url_rel([list]) %]">[%|loc%]Manage Subscribers[%END%]</a></li>
[% END %]
[% IF conf.use_blacklist != 'none' %]
[% IF action == 'blacklist' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a  href="[% 'blacklist' | url_rel([list]) %]" >[%|loc%]Blacklist[%END%]</a></li>
[% END %]
[% IF is_archived %]
[% IF action == 'arc_manage' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a  href="[% 'arc_manage' | url_rel([list]) %]">[%|loc%]Manage Archives[%END%]</a></li>
[% END %]
[% IF is_owner %]
[% IF action == 'reviewbouncing' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a  href="[% 'reviewbouncing' | url_rel([list]) %]">[%|loc%]Bounces[%END%]</a></li>
[% END %]
[% IF is_priv || is_listmaster %]
[% IF action == 'viewlogs' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a  href="[% 'viewlogs' | url_rel([list]) %]" >[%|loc%]Logs[%END%]</a></li>
[% END %]
  </ul>
</menu>
</nav>
[% END %]

[% IF action == 'compose_mail' %]
[%# Remove the class "menu-icon" to get rid of menu icon.
    Take out inner text of span element to just have icon alone. ~%]
<nav class="top-bar" data-topbar role="navigation">
    <ul class="title-area">
        <li class="name">
        </li>
        <li class="toggle-topbar menu-icon"><a href="#"><span>[%|loc%]Menu[%END%]</span></a></li>
    </ul>
<menu class="top-bar-section">
  <ul class="left">
    [% IF subaction == '' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'compose_mail' | url_rel([list]) %]">[%|loc%]Send a message[%END%]</a></li>
    [% IF subaction == 'html_news_letter' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %]
    <li class="[% class %]"><a href="[% 'compose_mail' | url_rel([list,'html_news_letter']) %]">[%|loc%]Send an html page[%END%]</a></li>
  </ul>
</menu>
</nav>
[% END %]

<!-- end nav.tt2 -->
