diff options
Diffstat (limited to 'mediagoblin/templates')
11 files changed, 109 insertions, 32 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 31f0f0c3..6eaad70b 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -109,9 +109,9 @@ <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}"> {%- trans %}Create new collection{% endtrans -%} </a> - {% if request.user.is_admin %} + {% if request.user.has_privilege('admin','moderator') %} <p> - <span class="dropdown_title">Admin powers:</span> + <span class="dropdown_title">Moderation powers:</span> <a href="{{ request.urlgen('mediagoblin.moderation.media_panel') }}"> {%- trans %}Media processing panel{% endtrans -%} </a> diff --git a/mediagoblin/templates/mediagoblin/meta/code_of_conduct.html b/mediagoblin/templates/mediagoblin/meta/code_of_conduct.html new file mode 100644 index 00000000..e8233ad3 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/meta/code_of_conduct.html @@ -0,0 +1,46 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#} +{% extends "mediagoblin/base.html" %} + +{% block title %} + Code of Conduct +{% endblock %} + +{% block mediagoblin_content -%} +<h2>{% trans %}Code of Conduct for this Website{% endtrans %}</h2> + +{# Suggested layout for this page: +<ol id="code_of_conduct_list"> + <li> Item #1 </li> + <li> + Item #2 + <ol class="nested_sublist"> + <li>Sub-Item #1</li> + <li>Sub-Item #2</li> + <li> + Sub-Item #3 + <ol class="nested_sublist"> + <li>Sub-Subitem #1</li> + </ol> + </li> + </ol> + </li> + <li>Item #3 </li> +</ol> +#} +{% endblock -%} diff --git a/mediagoblin/templates/mediagoblin/meta/reports_details.html b/mediagoblin/templates/mediagoblin/meta/reports_details.html new file mode 100644 index 00000000..6fa5ae59 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/meta/reports_details.html @@ -0,0 +1,17 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#} diff --git a/mediagoblin/templates/mediagoblin/meta/reports_panel.html b/mediagoblin/templates/mediagoblin/meta/reports_panel.html new file mode 100644 index 00000000..6fa5ae59 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/meta/reports_panel.html @@ -0,0 +1,17 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#} diff --git a/mediagoblin/templates/mediagoblin/moderation/report.html b/mediagoblin/templates/mediagoblin/moderation/report.html index b912c712..04788f05 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report.html +++ b/mediagoblin/templates/mediagoblin/moderation/report.html @@ -122,7 +122,7 @@ {{ report.report_content }} </div> </div> - {% if not report.is_archived_report() %} + {% if not report.is_archived_report() and not (report.reported_user.has_privilege('admin') and not request.user.has_privilege('admin')) %} <input type=button value=Resolve id=open_resolution_form /> <form action="" method="POST" id=resolution_form> {{ wtforms_util.render_divs(form) }} @@ -163,19 +163,6 @@ $(document).ready(function() { $('#'+name).hide(); }); }); -/* $.each(hidden_input_names, function(key,name){ - if ($.inArray(key, $('ul#action_to_resolve li input:checked').val())){ - $.each(hidden_input_names[key], function(index,name){ - $('#'+name).show(); - $('label[for='+name+']').show(); - }); - } else { - $.each(hidden_input_names[key], function(index,name){ - $('#'+name).hide(); - $('label[for='+name+']').hide(); - }); - } - });*/ }); $("#user_banned_until").focus(function() { $(this).val(""); @@ -188,7 +175,7 @@ $(document).ready(function() { }); }); </script> - {% else %} + {% elif not (report.reported_user.has_privilege('admin')) %} <h2><img src="{{ request.staticdirect('/images/icon_clipboard.png') }}" alt="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license. Distributed by the GNOME project http://www.gnome.org" /> @@ -199,6 +186,9 @@ $(document).ready(function() { {% autoescape False %} <p>{{ report.result }}</p> {% endautoescape %} + {% else %} + <input type=button disabled=disabled value="Resolve This Report"/> + <p>You cannot take action against an administrator</p> {% endif %} {% endif %} {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/moderation/report_panel.html b/mediagoblin/templates/mediagoblin/moderation/report_panel.html index f3840e29..2818eb80 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report_panel.html +++ b/mediagoblin/templates/mediagoblin/moderation/report_panel.html @@ -112,7 +112,7 @@ <td>{{ report.reported_user.username }}</td> <td>{{ report.created.strftime("%F %R") }}</td> <td>{{ report.reporter.username }}</td> - <td>{{ report.report_content }}</td> + <td>{{ report.report_content[:15] }}...</td> </tr> {% endfor %} </table> diff --git a/mediagoblin/templates/mediagoblin/moderation/user.html b/mediagoblin/templates/mediagoblin/moderation/user.html index 3fb65063..d8454d2d 100644 --- a/mediagoblin/templates/mediagoblin/moderation/user.html +++ b/mediagoblin/templates/mediagoblin/moderation/user.html @@ -33,12 +33,10 @@ {# If no user... #} {% if not user %} <p>{% trans %}Sorry, no such user found.{% endtrans %}</p> - {# User exists, but needs verification #} {% elif user.status == "needs_email_verification" %} <div class="form_box"> <h1>{% trans %}Email verification needed{% endtrans %}</h1> - <p> {% trans -%} Someone has registered an account with this username, but it still has @@ -56,6 +54,10 @@ {# Active(?) (or at least verified at some point) user, horray! #} {% else %} + <a href="{{ request.urlgen('mediagoblin.moderation.users') }}" + class="return_to_panel button_action" + title="Return to Users Panel"> + {% trans %}Return to Users Panel{% endtrans %}</a> <h1> {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} {% if user_banned and user_banned.expiration_date %} @@ -64,7 +66,6 @@ — Banned Indefinitely {% endif %} </h1> - {% if not user.url and not user.bio %} <div class="profile_sidebar empty_space"> <p> @@ -76,7 +77,7 @@ <div class="profile_sidebar"> {% include "mediagoblin/utils/profile.html" %} {% if request.user and - (request.user.id == user.id or request.user.is_admin) %} + (request.user.id == user.id or request.user.has_privilege('admin')) %} <a href="{{ request.urlgen('mediagoblin.edit.profile', user=user.username) }}"> {%- trans %}Edit profile{% endtrans -%} @@ -145,13 +146,19 @@ <td class="user_without_privilege"> No{% endif %} </td> - {% if requesting_user_privileges.admin%} - <td>{% if privilege in user.all_privileges %} - <input type=submit id="{{ privilege.privilege_name }}" class=submit_button value ="-" />{% else %} - <input type=submit id="{{ privilege.privilege_name }}" class=submit_button value ="+" />{% endif %} + {% if request.user.has_privilege('admin') %} + <td> + {% if privilege in user.all_privileges %} + <input type=submit id="{{ privilege.privilege_name }}" + class="submit_button button_action" + value =" -" /> + {% else %} + <input type=submit id="{{ privilege.privilege_name }}" + class="submit_button button_action" + value ="+" /> + {% endif %} </td> {% endif %} - </tr> {% endfor %} </table> diff --git a/mediagoblin/templates/mediagoblin/user_pages/collection.html b/mediagoblin/templates/mediagoblin/user_pages/collection.html index 5a7baadd..87635dcb 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/collection.html +++ b/mediagoblin/templates/mediagoblin/user_pages/collection.html @@ -45,7 +45,7 @@ {%- endtrans %} </h1> {% if request.user and (collection.creator == request.user.id or - request.user.is_admin) %} + request.user.has_privilege(u'admin')) %} {% set edit_url = request.urlgen('mediagoblin.edit.edit_collection', user=collection.get_creator.username, collection=collection.slug) %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index b10ef3be..441452f2 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -72,7 +72,7 @@ </h2> {% if request.user and (media.uploader == request.user.id or - request.user.is_admin) %} + request.user.has_privilege('admin')) %} {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', user= media.get_uploader.username, media_id=media.id) %} @@ -198,7 +198,7 @@ {%- if app_config['allow_attachments'] and request.user and (media.uploader == request.user.id - or request.user.is_admin) %} + or request.user.has_privilege('admin')) %} {%- if not media.attachment_files|count %} <h3>{% trans %}Attachments{% endtrans %}</h3> {%- endif %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index 71acd66c..de92fb5e 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -111,7 +111,7 @@ <div class="profile_sidebar"> {% include "mediagoblin/utils/profile.html" %} {% if request.user and - (request.user.id == user.id or request.user.is_admin) %} + (request.user.id == user.id or request.user.has_privilege('admin')) %} <a href="{{ request.urlgen('mediagoblin.edit.profile', user=user.username) }}"> {%- trans %}Edit profile{% endtrans -%} diff --git a/mediagoblin/templates/mediagoblin/utils/collection_gallery.html b/mediagoblin/templates/mediagoblin/utils/collection_gallery.html index dcc59244..24bf6832 100644 --- a/mediagoblin/templates/mediagoblin/utils/collection_gallery.html +++ b/mediagoblin/templates/mediagoblin/utils/collection_gallery.html @@ -39,7 +39,7 @@ {% endif %} {% if request.user and (item.in_collection.creator == request.user.id or - request.user.is_admin) %} + request.user.has_privilege(u'admin')) %} {%- set remove_url=request.urlgen( 'mediagoblin.user_pages.collection_item_confirm_remove', user=item.in_collection.get_creator.username, |