1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 15:53:28 +00:00
Files
seahub/templates/snippets/events.html

76 lines
4.0 KiB
HTML
Raw Normal View History

{% load seahub_tags avatar_tags group_avatar_tags i18n %}
{% load url from future %}
2012-11-01 17:37:17 +08:00
<h3>{% trans 'Recent Events' %}</h3>
<ul id="events" class="hide">
{% for ev in events %}
<li class="event-item w100 ovhd">
{% if ev.etype == 'repo-update' %}
{% with author=ev.commit.creator_name commit=ev.commit repo=ev.repo %}
<div class="pic fleft" data="{{ author }}">
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{% avatar author 40 %}</a>
</div>
<div class="txt fright">
<div class="event-hd">
<span class="time">{{ commit.ctime|translate_seahub_time }}</span>
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
</div>
<p>{% trans 'Updated library' %} <a href="{{SITE_ROOT}}repo/{{repo.id}}">{{ repo.name }}</a></p>
<p class="commit-msg ovhd">{{ commit.desc|translate_commit_desc }}
{% if repo.encrypted %}
{% if repo.password_set %}
<a class="lsch-encrypted" password_set="true" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" repo_id="{{repo.id}}" repo_name="{{repo.name}}" data="{{ commit.props.ctime|tsstr_sec }}">{% trans 'Details' %}</a>
{% else %}
<a class="lsch-encrypted" password_set="false" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" repo_id="{{repo.id}}" repo_name="{{repo.name}}" data="{{ commit.props.ctime|tsstr_sec }}">{% trans 'Details' %}</a>
{% endif %}
{% else %}
<a class="lsch" href="{{ SITE_ROOT }}repo/history/changes/{{ repo.id }}/?commit_id={{ commit.id }}" data="{{ commit.props.ctime|tsstr_sec }}">{% trans 'Details' %}</a>
{% endif %}
</p>
</div>
{% endwith %}
{% endif %}
{% if ev.etype == 'repo-create' %}
{% with author=ev.creator repo_id=ev.repo_id repo_name=ev.repo_name %}
<div class="pic fleft" data="{{ author }}">
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{% avatar author 40 %}</a>
</div>
<div class="txt fright">
<div class="event-hd">
<span class="time">{{ ev.timestamp|translate_seahub_time }}</span>
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
</div>
<p>{% trans 'Created library' %} <a href="{{SITE_ROOT}}repo/{{repo_id}}">{{ repo_name }}</a></p>
</div>
{% endwith %}
{% endif %}
{% if ev.etype == 'repo-delete' %}
{% with author=ev.repo_owner repo_name=ev.repo_name %}
<div class="pic fleft" data="{{ author }}">
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{% avatar author 40 %}</a>
</div>
<div class="txt fright">
<div class="event-hd">
<span class="time">{{ ev.timestamp|translate_seahub_time }}</span>
<a href="{% url 'user_profile' author %}" title="{{ author|email2nickname}}">{{ author|email2nickname }}</a>
</div>
<p>{% trans 'Deleted library' %} {{ repo_name }}</p>
</div>
{% endwith %}
{% endif %}
</li>
{% endfor %}
</ul>
<form id="repo-set-password-form" class="hide">
<h3>{% trans 'Library' %} <span class="repo-name"></span> {% trans 'is encrypted' %}</h3>
<input type="hidden" name="repo_id" value="" />
<label>{% trans 'Password' %}</label>
<input type="password" name="password" maxlength="64" />
<p class="tip">{% trans 'The password will be kept in the server for only 1 hour.' %}</p>
<p class="error"></p>
<input type="submit" class="submit" value="{% trans 'Submit' %}" />
<button class="simplemodal-close">{% trans 'Cancel' %}</button>
</form>
<div id="ls-ch" class="hide"></div><!--list modification details of a commit-->