1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 07:41:26 +00:00

modified group name display in home page

This commit is contained in:
llj
2013-01-12 17:44:08 +08:00
parent 33c181ede3
commit dfba47e34e
4 changed files with 11 additions and 7 deletions

View File

@@ -261,3 +261,10 @@ def translate_permission(value):
def quote(value):
from urllib2 import quote
return quote(value)
@register.filter(name='trim')
def trim(value, length):
if len(value) > length:
return value[:length-2] + '...'
else:
return value

View File

@@ -720,8 +720,6 @@ textarea:-moz-placeholder {/* for FF */
.mygroup .name {
display:inline-block;
width:100%;
height:1.5em;
overflow:hidden;
}
#repo-create,
#contact-add,

View File

@@ -56,14 +56,13 @@
<p class="info-item-bottom">{{ quota_usage|filesizeformat }} {% if quota > 0 %}/ {{ quota|filesizeformat }} {% endif %}</p>
</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 %}

View File

@@ -1,4 +1,4 @@
{% load group_avatar_tags i18n %}
{% load seahub_tags group_avatar_tags i18n %}
{% load url from future %}
<div class="info-item">
<h3 class="info-item-top">{% trans "My Groups" %}</h3>
@@ -7,9 +7,9 @@
{% for group in groups %}
<li class="mygroup">
<a href="{{ SITE_ROOT }}group/{{ group.props.id }}/" class="no-deco">
<img src="{% grp_avatar_url group.props.id 48 %}" alt="{{ group.props.group_name }}的图标" title="{{ group.props.group_name }}" class="avatar" />
<img src="{% grp_avatar_url group.props.id 48 %}" alt="{{ group.props.group_name }}" title="{{ group.props.group_name }}" class="avatar" />
</a>
<a class="name" href="{{ SITE_ROOT }}group/{{ group.props.id }}/" title="{{ group.props.group_name }}">{{ group.props.group_name }}</a>
<a class="name" href="{{ SITE_ROOT }}group/{{ group.props.id }}/" title="{{ group.props.group_name }}">{{ group.props.group_name|trim:12 }}</a>
</li>
{% endfor %}
</ul>