From 08750772eaf140266d1be0aac5024f581664012b Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Mon, 22 Aug 2011 02:57:40 -0700 Subject: + 'confirm' section for confirmation dialogues + implemented delete functionality * fixed several instances of 'must be an instance of unicode, not str' --- mediagoblin/templates/mediagoblin/user_pages/media.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 6747fddc..c80144aa 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -127,8 +127,11 @@ class="media_icon" />edit

- {% trans %}delete{% endtrans %} + {% trans %}delete{% endtrans %}

{% endif %} -- cgit v1.2.3 From ae4feecfc20b6c7daf54e7822dc85dba6ac0f2eb Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Mon, 22 Aug 2011 03:35:44 -0700 Subject: * Fix bad commit (oops!) * Delete works now --- .../mediagoblin/confirm/confirm_delete.html | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 mediagoblin/templates/mediagoblin/confirm/confirm_delete.html (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html b/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html new file mode 100644 index 00000000..ada89d5d --- /dev/null +++ b/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html @@ -0,0 +1,40 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011 Free Software Foundation, Inc +# +# 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 . +#} +{% extends "mediagoblin/base.html" %} + +{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} + +{% block mediagoblin_content %} + +
+
+

+ {%- trans title=media['title'] -%} + Really delete {{ title }}? + {%- endtrans %} +

+ {{ wtforms_util.render_divs(form) }} +
+ +
+
+
+{% endblock %} -- cgit v1.2.3 From 46df0297e029c075a2c28b0c31490c560c99158c Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Mon, 29 Aug 2011 00:42:55 +0200 Subject: Added notice that deletion of a media entry is *permanent* --- mediagoblin/templates/mediagoblin/confirm/confirm_delete.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html b/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html index ada89d5d..67d45811 100644 --- a/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html +++ b/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html @@ -31,6 +31,14 @@ Really delete {{ title }}? {%- endtrans %} +

+ + {%- trans -%} + If you choose yes, the media entry will be deleted permanently. + {%- endtrans %} + +

+ {{ wtforms_util.render_divs(form) }}
-- cgit v1.2.3 From 7d0efbae2955cf58eed86daa30cd3507c9088269 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Tue, 30 Aug 2011 23:11:49 +0200 Subject: Deleted old `mediagoblin.confirm` files --- .../mediagoblin/confirm/confirm_delete.html | 48 ---------------------- 1 file changed, 48 deletions(-) delete mode 100644 mediagoblin/templates/mediagoblin/confirm/confirm_delete.html (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html b/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html deleted file mode 100644 index 67d45811..00000000 --- a/mediagoblin/templates/mediagoblin/confirm/confirm_delete.html +++ /dev/null @@ -1,48 +0,0 @@ -{# -# GNU MediaGoblin -- federated, autonomous media hosting -# Copyright (C) 2011 Free Software Foundation, Inc -# -# 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 . -#} -{% extends "mediagoblin/base.html" %} - -{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} - -{% block mediagoblin_content %} - -
-
-

- {%- trans title=media['title'] -%} - Really delete {{ title }}? - {%- endtrans %} -

-

- - {%- trans -%} - If you choose yes, the media entry will be deleted permanently. - {%- endtrans %} - -

- - {{ wtforms_util.render_divs(form) }} -
- -
-
-
-{% endblock %} -- cgit v1.2.3 From 502073f2bf65380be18b349a678ac075777889a4 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Tue, 30 Aug 2011 23:16:46 +0200 Subject: Feature #403 - Ability to delete media entries - Fixes according to feedback * Moved `mediagoblin.confirm` stuff to `mediagoblin.user_pages`, templates too. * Removed route extension for `mediagoblin.confirm` * Created `delete_media_files` which deletes all media files on the public_store when the entry is deleted * Created a new decorator to check if a user has the permission to delete an entry. --- .../templates/mediagoblin/user_pages/media.html | 2 +- .../user_pages/media_confirm_delete.html | 48 ++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index fe953e77..171ea21d 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -128,7 +128,7 @@ class="media_icon" />edit

- . +#} +{% extends "mediagoblin/base.html" %} + +{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} + +{% block mediagoblin_content %} + +

+
+

+ {%- trans title=media['title'] -%} + Really delete {{ title }}? + {%- endtrans %} +

+

+ + {%- trans -%} + If you choose yes, the media entry will be deleted permanently. + {%- endtrans %} + +

+ + {{ wtforms_util.render_divs(form) }} +
+ +
+
+ +{% endblock %} -- cgit v1.2.3