2012-10-26 11:15:52 +00:00
{% load seahub_tags i18n %}
2012-10-26 11:50:36 +00:00
{% load url from future %}
2012-10-26 11:54:45 +00:00
< h3 > {% trans "Libraries" %}< / h3 >
2012-10-09 09:47:31 +00:00
< div id = "repos-tabs" >
< div class = "ovhd" >
< ul class = "fleft" >
2012-10-27 03:42:13 +00:00
< li > < a href = "#my-own-repos" onfocus = "this.blur()" > {% trans "Mine" %}< / a > < / li >
< li > < a href = "#repos-shared-to-me" onfocus = "this.blur()" > {% trans "Shared" %}< / a > < / li >
2012-10-27 06:11:37 +00:00
< li > < a href = "#starred-files" onfocus = "this.blur()" > {% trans "Starred" %}< / a > < / li >
2012-10-09 09:47:31 +00:00
< / ul >
2012-10-26 11:54:45 +00:00
< button id = "repo-create" class = "fright" > {% trans "New Library" %}< / button >
2012-10-09 09:47:31 +00:00
< / div >
< div id = "my-own-repos" >
2012-09-05 03:03:15 +00:00
{% if owned_repos %}
< table >
< tr >
2012-09-27 08:32:17 +00:00
< th width = "4%" > <!-- icon --> < / th >
2012-10-26 11:15:52 +00:00
< th width = "24%" > {% trans "Name" %}< / th >
< th width = "43%" > {% trans "Description" %}< / th >
2012-11-01 07:09:14 +00:00
< th width = "15%" > {% trans "Last Update" %}< / th >
2012-10-26 11:15:52 +00:00
< th width = "14%" > {% trans "Operations" %}< / th >
2012-09-05 03:03:15 +00:00
< / tr >
{% for repo in owned_repos %}
< tr >
2012-10-27 03:21:31 +00:00
< td > < img src = "{{MEDIA_URL}}img/sync-folder-20.png" title = "{% trans " Read-Write " % } " alt = "{% trans " directory icon " % } " / > < / td >
2012-09-05 03:03:15 +00:00
< td > < a href = "{{ SITE_ROOT }}repo/{{ repo.props.id }}/" > {{ repo.props.name }}< / a > < / td >
< td > {{ repo.props.desc }}< / td >
{% if repo.latest_modify %}
2012-11-05 09:27:57 +00:00
< td > {{ repo.latest_modify|translate_seahub_time }}< / td >
2012-09-05 03:03:15 +00:00
{% else %}
< td > --< / td >
{% endif %}
< td >
2012-10-26 11:15:52 +00:00
< img src = "{{ MEDIA_URL }}img/download-20.png" data = "{{ repo.props.id }}" class = "download-btn op-icon vh" title = "{% trans " Download " % } " alt = "{% trans " Download " % } " / >
< img src = "{{ MEDIA_URL }}img/share-20.png" data = "{{ repo.props.id }}" class = "repo-share-btn op-icon vh" title = "{% trans " Share " % } " alt = "{% trans " Share " % } " / >
< img src = "{{ MEDIA_URL }}img/delete-20.png" data = "{{ SITE_ROOT }}repo/remove/{{ repo.props.id }}/?next={{ request.path }}" class = "repo-delete-btn op-icon vh" title = "{% trans " Delete " % } " alt = "{% trans " Delete " % } " / >
2012-09-05 03:03:15 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
2012-10-09 08:45:06 +00:00
{% else %}
2012-11-02 11:45:51 +00:00
< div class = "empty-tips" >
< h2 class = "center-contents" > {% trans "You have not created any libraries" %}< / h2 >
< p > {% trans "You can create a library to organize your files. For example, you can create one for each of your projects. Each library can be synchronized and shared separately." %}< / p >
< h3 > {% trans "Synchronize libraries with PC client" %}< / h3 >
< p > {% trans "1. Download the library (make sure PC client is running)." %}< / p >
< p > {% trans "2. Add files to the folder and they will be uploaded automatically." %}< / p >
< / div >
2012-09-05 03:03:15 +00:00
{% endif %}
2012-10-09 09:47:31 +00:00
< / div >
< div id = "repos-shared-to-me" >
{% if in_repos %}
< table >
< tr >
< th width = "4%" > <!-- icon --> < / th >
2012-10-26 11:15:52 +00:00
< th width = "20%" > {% trans "Name" %}< / th >
2012-11-03 03:53:25 +00:00
< th width = "33%" > {% trans "Description" %}< / th >
2012-11-01 07:09:14 +00:00
< th width = "15%" > {% trans "Last Update" %}< / th >
2012-10-29 13:43:52 +00:00
< th width = "15%" > {% trans "Shared By" %}< / th >
2012-11-03 03:53:25 +00:00
< th width = "13%" > {% trans "Operations" %}< / th >
2012-10-09 09:47:31 +00:00
< / tr >
{% for repo in in_repos %}
< tr >
< td >
{% if repo.user_perm == 'rw' %}
2012-10-27 03:21:31 +00:00
< img src = "{{MEDIA_URL}}img/sync-folder-20.png" title = "{% trans " Read-Write " % } " alt = "{% trans " directory icon " % } " / >
2012-10-09 09:47:31 +00:00
{% else %}
2012-10-27 03:21:31 +00:00
< img src = "{{MEDIA_URL}}img/folder-no-write-20.png" title = "{% trans " Read-Only " % } " alt = "{% trans " directory icon " % } " / >
2012-10-09 09:47:31 +00:00
{% endif %}
< / td >
< td > < a href = "{{ SITE_ROOT }}repo/{{ repo.props.repo_id }}" > {{ repo.props.repo_name }}< / a > < / td >
< td > {{ repo.props.repo_desc }}< / td >
{% if repo.props.last_modified %}
2012-11-05 09:27:57 +00:00
< td > {{ repo.props.last_modified|translate_seahub_time }}< / td >
2012-10-09 09:47:31 +00:00
{% else %}
< td > --< / td >
{% endif %}
< td > {{ repo.props.user|email2nickname }}< / td >
< td >
2012-10-26 11:15:52 +00:00
< img src = "{{ MEDIA_URL }}img/download-20.png" data = "{{ repo.props.repo_id }}" class = "download-btn op-icon vh" title = "{% trans " Download " % } " alt = "{% trans " Download " % } " / >
2012-11-06 03:12:49 +00:00
< img src = "{{ MEDIA_URL }}img/delete-20.png" data = "{% url 'repo_remove_share' %}?repo_id={{ repo.props.repo_id }}&from={{ repo.props.user }}&to={{ request.user }}" class = "unshare-btn op-icon vh" title = "{% trans " Leave Share " % } " alt = "{% trans " Leave Share " % } " / >
2012-10-09 09:47:31 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
{% else %}
2012-11-02 11:45:51 +00:00
< div class = "empty-tips" >
< h2 class = "center-contents" > {% trans "No library is shared to you" %}< / h2 >
2012-11-04 05:29:20 +00:00
< p > {% trans "Libraries shared to you will be listed here. Libraries shared as writable can be downloaded and synced. Read only libraries can only be viewed online." %}< / p >
2012-11-02 11:45:51 +00:00
< / div >
2012-10-09 09:47:31 +00:00
{% endif %}
< / div >
2012-10-26 11:50:36 +00:00
< div id = "starred-files" >
{% if starred_files %}
< table >
< tr >
< th width = "5%" > < / th >
2012-10-27 09:23:30 +00:00
< th width = "45%" > {% trans "File Name" %}< / th >
2012-10-27 03:21:31 +00:00
< th width = "30%" > {% trans "Library" %}< / th >
2012-11-01 07:09:14 +00:00
< th width = "20%" > {% trans "Last Update" %}< / th >
2012-10-26 11:50:36 +00:00
< / tr >
{% for sfile in starred_files %}
< tr >
2012-10-27 03:21:31 +00:00
< td class = "icon-container" > < img src = "{{ MEDIA_URL }}img/file/{{ sfile.path|file_icon_filter }}" alt = "{% trans " icon " % } " / > < / td >
2012-10-26 11:50:36 +00:00
< td >
< a href = "{% url 'repo_view_file' sfile.repo.id %}?p={{ sfile.path|urlencode }}" > {{ sfile.formatted_path }}< / a >
< / td >
< td > {{ sfile.repo.name }}< / td >
2012-11-05 09:27:57 +00:00
< td > {{ sfile.last_modified|translate_seahub_time }}< / td >
2012-10-26 11:50:36 +00:00
< / tr >
{% endfor %}
< / table >
{% else %}
2012-11-02 11:45:51 +00:00
< div class = "empty-tips" >
< h2 class = "center-contents" > {% trans "You don't have any starred files yet" %}< / h2 >
< p > {% blocktrans %}You can star important files by clicking the "Star" button on file viewing page, and they will be listed here.{% endblocktrans %}< / p >
< / div >
2012-10-26 11:50:36 +00:00
{% endif %}
< / div >
2012-10-09 09:47:31 +00:00
< / div >