{#-
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-#}
{% extends g.theme.master %}
{% import 'allura:templates/jinja_master/lib.html' as lib with context %}
{% import 'forgeactivity:templates/macros.html' as am with context %}
{% do g.register_app_css('css/files.css', compress=False) %}
{% block title %}
{{c.project.name}} / {{c.app.config.options.mount_label}} / File Upload
{% endblock %}
{% macro path_links(parts, urls) %}
{% if parts != [''] %}
/
{% endif %}
{% for part in parts %}
{% if part != '...' and not loop.last %}
{{part}}
/
{% else %}
{{ part }} {% if not loop.last %} / {% endif %}
{% endif %}
{% endfor %}
{% endmacro %}
{% block header %}
Files {% if folder_object %} - {{path_links(folder_path.split('/'), urls)}} {% endif %}
{% endblock %}
{% block actions %}
{% if c.user and c.user != c.user.anonymous() %}
{{c.subscribe_form.display(value=subscribed, action='subscribe', style='icon')}}
{% endif %}
{% endblock %}
{% block content %}
{% if h.has_access(c.project, 'admin') %}
{% endif %}
{% if file_objects or folder_objects %}
{% if h.has_access(c.project, 'admin') %}
{% endif %}
File |
Date |
Size |
Author |
{% if h.has_access(c.project, 'admin') %}
Actions |
{% endif %}
{% for folder in folder_objects %}
{% set icon_name = 'folder' %}
{{folder.folder_name|truncate(30)}}
|
{{lib.abbr_date(folder.created_date)}} |
|
{{folder.author.display_name|truncate(30)}} |
{% if h.has_access(c.project, 'admin') %}
|
{% endif%}
{% endfor %}
{% for file in file_objects %}
{% set icon_name = 'file' %}
{{file.filename|truncate(30)}}
|
{{lib.abbr_date(file.created_date)}} |
{{h.do_filesizeformat(file.length)}} |
{{file.author.display_name|truncate(30)}} |
{% if h.has_access(c.project, 'admin') %}
|
{% endif %}
{% endfor %}
{{ lib.csrf_token() }}
{% else %}
No file or folder has been uploaded yet.
{% endif %}
{% for file in file_objects %}
{% if not file.disabled %}
{% set name, text = file.readme() %}
{% if name %}
Read Me
{{h.render_any_markup(name, text)}}
{% endif %}
{% endif %}
{% endfor %}
{% endblock %}
{% block extra_js %}
{% endblock %}