{% extends "myhome_base.html" %}
{% load i18n %}
{% block nav_myhome_class %}class="cur"{% endblock %}

{% block left_panel %}
<div class="side-tabnav">
    <div class="hd w100 ovhd">
        <h3 class="fleft">{% trans "Personal" %}</h3>
        <span id="enable-mods" class="icon-th fright" title="{% trans "Enable Modules" %}"></span>
    </div>
    <ul class="side-tabnav-tabs">
        <li class="tab {% block cur_my_lib %}{% endblock %}"><a href="{% url 'myhome' %}"><span class="sf2-icon-archive vam"></span><span class="vam">{% trans "Libraries" %}</span></a></li>
        <li class="tab {% block cur_stars %}{% endblock %}"><a href="{% url 'starred' %}"><span class="icon-star"></span>{% trans "Starred" %}</a></li>
        {% if events_enabled %}
        <li class="tab {% block cur_activities %}{% endblock %}"><a href="{% url 'activities' %}"><span class="icon-rss"></span>{% trans "Activities" %}</a></li>
        {% endif %}
        {% for mod in mods_enabled %}
        {% if mod == 'personal wiki' %}
        <li class="tab {% block cur_personal_wiki %}{% endblock %}"><a href="{% url 'personal_wiki' %}"><span class="icon-book"></span>{% trans "Personal Wiki" %}</a></li>
        {% endif %}
        {% endfor %}
        <li class="tab {% block cur_messages %}{% endblock %}"><a href="{% url 'message_list' %}"><span class="icon-comment"></span>{% trans "Messages" %}</a></li>
        <li class="tab {% block cur_clients %}{% endblock %}"><a href="{% url 'client_mgmt' %}"><span class="icon-desktop"></span>{% trans "Clients" %}</a></li>
        <li class="tab {% block cur_contacts %}{% endblock %}"><a href="{% url 'contacts' %}"><span class="icon-user"></span>{% trans "Contacts" %}</a></li>
    </ul>
    <h3 class="hd">{% trans "Share Admin" %}</h3>
    <ul class="side-tabnav-tabs">
        <li class="tab {% block cur_share_libs %}{% endblock %}"><a href="{% url 'share_admin' %}"><span class="sf2-icon-archive vam"></span><span class="vam">{% trans "Libraries" %}</span></a></li>
        <li class="tab {% block cur_share_folders %}{% endblock %}"><a href="{% url 'list_priv_shared_folders' %}"><span class="icon-folder-close"></span>{% trans "Folders" %}</a></li>
        <li class="tab {% block cur_share_files %}{% endblock %}"><a href="{% url 'list_priv_shared_files' %}"><span class="icon-file"></span>{% trans "Files" %}</a></li>        
        <li class="tab {% block cur_share_links %}{% endblock %}"><a href="{% url 'list_shared_links' %}"><span class="icon-link"></span>{% trans "Links" %}</a></li>
    </ul>
</div>
{% endblock %}

{% block main_panel %}
<form id="mods-enable-form" method="post" action="{% url 'toggle_modules' %}" class="hide">{% csrf_token%}
    <h3>{% trans "Enable Modules"%}</h3>
    <ul>
    {% for mod in mods_available %}
      {% if mod == 'personal wiki' %}
      <li>
      <input class="vam" type="checkbox" name="personal_wiki" {%if mod in mods_enabled%}checked {% endif%}/>
      <span class="vam">{% trans "Personal Wiki" %}</span>
      </li>
      {% endif %}
    {% endfor %}    
    </ul>
    <input type="submit" id="mods-enable-submit" value="{% trans "Submit"%}" class="submit"/>
</form>
{% endblock %}

{% block extra_script %}
<script type="text/javascript">
$('#enable-mods').click(function() {
    $('#mods-enable-form').modal({appendTo: "#main"});
    $('#simplemodal-container').css('height', 'auto');
    return false;
});
</script>
{% endblock %}
