From aba81c9f20acd0fa3fd1a31db678fccfba8777d1 Mon Sep 17 00:00:00 2001 From: Elrond Date: Thu, 26 May 2011 23:09:33 +0200 Subject: Starting "edit" functionality. This adds a link to the "edit" form, the form, the view for displaying the form and that's about it. --- mediagoblin/templates/mediagoblin/edit/edit.html | 38 ++++++++++++++++++++++ .../templates/mediagoblin/user_pages/media.html | 3 ++ 2 files changed, 41 insertions(+) create mode 100644 mediagoblin/templates/mediagoblin/edit/edit.html (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html new file mode 100644 index 00000000..72773cb5 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/edit/edit.html @@ -0,0 +1,38 @@ +{# +# 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 %} +

Edit details for {{ media.title }}

+ +
+ + {{ wtforms_util.render_table(form) }} + + + + +
+
+ +{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 036bf726..f13c32e3 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -41,6 +41,9 @@ {{- media.uploader().username }}
Description: {{ media.description }} +
+ Edit {% else %}

Sorry, no such media found.

-- cgit v1.2.3 From 8782001bf0002143f412e9612e97939f57d63ffe Mon Sep 17 00:00:00 2001 From: Elrond Date: Thu, 26 May 2011 23:17:41 +0200 Subject: Use new button style --- mediagoblin/templates/mediagoblin/edit/edit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html index 72773cb5..bd85f361 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit.html +++ b/mediagoblin/templates/mediagoblin/edit/edit.html @@ -29,7 +29,7 @@ {{ wtforms_util.render_table(form) }} - + -- cgit v1.2.3 From b897fdf91b2fe03c299880545fc6712d50cd0e97 Mon Sep 17 00:00:00 2001 From: Elrond Date: Thu, 2 Jun 2011 16:39:47 +0200 Subject: Change edit form to use divs instead of table --- mediagoblin/templates/mediagoblin/edit/edit.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html index bd85f361..d694ce25 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit.html +++ b/mediagoblin/templates/mediagoblin/edit/edit.html @@ -25,13 +25,12 @@

- - {{ wtforms_util.render_table(form) }} - - - - -
+
+ {{ wtforms_util.render_divs(form) }} +
+ +
+
-- cgit v1.2.3 From 8cd5d4f8c3de634905651b1d1e8cd1355b7f3a99 Mon Sep 17 00:00:00 2001 From: Elrond Date: Thu, 2 Jun 2011 16:48:15 +0200 Subject: Prepare for moving /edit/ under /u/.../edit/ To make moving the whole thing under /u/ easier, prepare to pass in the {user} needed for that. --- mediagoblin/templates/mediagoblin/edit/edit.html | 1 + mediagoblin/templates/mediagoblin/user_pages/media.html | 1 + 2 files changed, 2 insertions(+) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html index d694ce25..295d57eb 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit.html +++ b/mediagoblin/templates/mediagoblin/edit/edit.html @@ -23,6 +23,7 @@

Edit details for {{ media.title }}

diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index b26e2514..406fd3f6 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -34,6 +34,7 @@ user= media.uploader().username) }}"> {{- media.uploader().username }}

Edit

{% else %}

Sorry, no such media found.

-- cgit v1.2.3