1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-15 05:33:38 +00:00
seahub/templates/myhome.html
2013-03-27 22:05:53 +08:00

133 lines
4.7 KiB
HTML

{% extends "myhome_base.html" %}
{% load seahub_tags avatar_tags group_avatar_tags i18n %}
{% load url from future %}
{% block nav_myhome_class %}class="cur"{% endblock %}
{% block left_panel %}
<div class="info-item">
<h3 class="info-item-top">{% trans "Account" %}</h3>
<div class="info-item-bottom home-profile ovhd">
<a href="{{ SITE_ROOT }}profile/" class="pic no-deco fleft" title="{% trans "Edit" %}">{% avatar request.user 48 %}</a>
<div class="txt fright">
<p>{% if nickname %}{{ nickname }}{% else %}{% trans "No Nickname" %}{% endif %}</p>
<a href="{{ SITE_ROOT }}profile/" class="edit">{% trans "Edit" %}</a>
</div>
</div>
</div>
{% if grpmsg_list or grpmsg_reply_list or orgmsg_list %}
<div class="info-item">
<h3 class="info-item-top">{% trans "Reminding..." %}</h3>
<ul class="info-item-bottom">
{% if grpmsg_list %}
<li>
{% for grp in grpmsg_list %}<a href="{% url 'group_discuss' grp.id %}" class="no-bold">{{ grp.group_name }} </a>{% endfor %}
{% blocktrans count counter=grpmsg_list|length %}
has new discussion
{% plural %}
have new discussions
{% endblocktrans %}
</li>
{% endif %}
{% if grpmsg_reply_list %}
<li><a href="{{ SITE_ROOT }}group/reply/new/" class="no-bold">{% blocktrans count counter=grpmsg_reply_list|length %}
one group discussion has new reply
{% plural %}
{{ counter }} group discussions have new replies
{% endblocktrans %}</a></li>
{% endif %}
{% if orgmsg_list %}
<li><a href="{% url 'org_msg' %}" class="no-bold">
{% blocktrans count counter=orgmsg_list|length %}
one org message
{% plural %}
{{ counter }} org messages
{% endblocktrans %}</a></li>
{% endif %}
</ul>
</div>
{% endif %}
<div class="info-item">
<h3 class="info-item-top">{% trans "Space/Traffic Usage" %}</h3>
<div class="info-item-bottom">
{% if CALC_SHARE_USAGE %}
<p>{% trans "Total" %}: {{ quota_usage|filesizeformat }} {% if quota > 0 %}/ {{ quota|filesizeformat }} {% endif %}</p>
{% if quota > 0 %}
{% if LANGUAGE_CODE == 'zh-cn' %}
<a href="http://www.seafile.com/help/quota/" target="_blank" id="quota-bar">
{% else %}
<a href="http://www.seafile.com/en/help/quota/" target="_blank" id="quota-bar">
{% endif %}
<span id="my-usage" title="{% trans "Self" %}"></span><span id="share-usage" title="{% trans "Sharing" %}"></span></a>
{% endif %}
<p id="usage-details">{% trans "Self" %} {{ my_usage|filesizeformat }}, {% trans "Sharing" %} {{ share_usage|filesizeformat }}</p>
{% else %}
<p>{{ quota_usage|filesizeformat }} {% if quota > 0 %}/ {{ quota|filesizeformat }} {% endif %}</p>
{% if quota > 0 %}
<div id="quota-bar"><span id="quota-usage"></span></div>
{% endif %}
{% endif %}
{% if TRAFFIC_STATS_ENABLED %}
<p class="traffic-stat">
{% if LANGUAGE_CODE == 'zh-cn' %}
<a href="http://www.seafile.com/help/traffic/" target="_blank" title="点击查看帮助">{% trans "Traffic this month:" %}</a>
{% else %}
<a href="http://www.seafile.com/en/help/traffic/" target="_blank" title="Click to see the help">{% trans "Traffic this month:" %}</a>
{% endif %}
&nbsp;&nbsp;{{ traffic_stat|filesizeformat }}
</p>
{% endif %}
</div>
</div>
{% with groups=joined_groups %}
{% include "snippets/my_groups.html" %}
{% endwith %}
{% endblock %}
{% block right_panel %}
<!--mine shared stared -->
{% include "snippets/my_owned_repos.html" %}
{% if events %}
{% include "snippets/events.html" %}
{% endif %}
{% url 'share_repo' as repo_share_url %}
{% with post_url=repo_share_url groups=joined_groups contacts=my_contacts %}
{% include "snippets/repo_share_form.html" %}
{% endwith %}
{% include "snippets/repo_create_form.html" %}
{% endblock %}
{% block extra_script %}
<script type="text/javascript">
{% if quota > 0 %}
{% if CALC_SHARE_USAGE %}
$('#my-usage').css({'width':{{my_usage}}/{{quota}} * 100 + '%'});
$('#share-usage').css({'width':{{share_usage}}/{{quota}} * 100 + '%'});
{% else %}
$('#quota-usage').css({'width':{{quota_usage}}/{{quota}} * 100 + '%'});
{% endif %}
{% endif %}
{% with groups=autocomp_groups %}
{% include "snippets/myhome_extra_script.html" %}
{% endwith %}
{% url 'seahub.views.repo_create' as repo_create_url %}
{% with post_url=repo_create_url %}
{% include "snippets/repo_create_js.html" %}
{% endwith %}
{% if events %}
{% include "snippets/events_js.html" %}
{% endif %}
</script>
{% endblock %}