Better right handling in files

This commit is contained in:
Skia
2016-08-10 14:48:18 +02:00
parent 1775569ecf
commit 830c15a585
7 changed files with 32 additions and 32 deletions

View File

@ -13,6 +13,7 @@
<body>
{% block header %}
{% if not popup %}
<div id="logo"><a href="{{ url('core:index') }}"><img src="{{ static('core/img/logo.png') }}"
alt="{% trans %}Logo{% endtrans %}" /></a></div>
<header>
@ -25,8 +26,12 @@
<a href="{{ url('core:logout') }}">{% trans %}Logout{% endtrans %}</a>
{% endif %}
</header>
{% else %}
<div id="popupheader">{{ user.get_display_name() }}</div>
{% endif %}
{% endblock %}
{% block nav %}
{% if not popup %}
<nav>
<a href="{{ url('core:user_list') }}">{% trans %}Users{% endtrans %}</a>
<a href="{{ url('core:page', page_name="Index") }}">{% trans %}Wiki{% endtrans %}</a>
@ -34,6 +39,7 @@
<a href="{{ url('club:club_list') }}">{% trans %}Clubs{% endtrans %}</a>
<a href="{{ url('core:page', "Services") }}">{% trans %}Services{% endtrans %}</a>
</nav>
{% endif %}
{% endblock %}
<div id="content">
@ -59,8 +65,7 @@
<script src="{{ static('core/js/multiple-select.js') }}"></script>
<script src="{{ static('core/js/script.js') }}"></script>
<script>
$('select').multipleSelect({
filter: true,
$('select:not([multiple])').multipleSelect({
single: true,
{% if not popup %}
position: 'top',

View File

@ -21,20 +21,6 @@
{% endif %}
{% endmacro %}
{% block header %}
{% if popup != "" %}
<div id="popupheader">{{ user.get_display_name() }}</div>
{% else %}
{{ super() }}
{% endif %}
{% endblock %}
{% block nav %}
{% if popup != "" %}
{% else %}
{{ super() }}
{% endif %}
{% endblock %}
{% block content %}
{{ print_file_name(file) }}

View File

@ -12,11 +12,13 @@
</h3>
<p>{% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}</p>
{% if file.is_folder %}
{% if user.can_edit(file) %}
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Add{% endtrans %}"></p>
</form>
{% endif %}
<ul>
{% for f in file.children.order_by('-is_folder', 'name').all() %}
<li>

View File

@ -2,11 +2,13 @@
{% block content %}
{{ super() }}
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Add{% endtrans %}"></p>
</form>
{% endif %}
{% if file_list %}
<h3>{% trans %}File list{% endtrans %}</h3>
<ul>