From 48693437391ddd9d3c9f732304b4990ff6967989 Mon Sep 17 00:00:00 2001 From: cfdv Date: Fri, 17 Jun 2011 21:43:48 -0500 Subject: adds global link to user's home page in the base.html template Issue #315 (add bio and website to user page) * enable profile edits * provide place in user's home page for details to appear --- mediagoblin/templates/mediagoblin/base.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index c7313173..8e5fd55b 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -35,6 +35,8 @@
{% if request.user %} {{ request.user['username'] }}'s account + home gallery (logout) -- cgit v1.2.3 From 630b57a366d10495a89d392c9b02cf432e6a1599 Mon Sep 17 00:00:00 2001 From: cfdv Date: Sat, 18 Jun 2011 16:42:22 -0500 Subject: baby step towards enabling profile edits adds * url and bio fields to database * form for editing the user profile * route to the edit profile controller * view for the profile editing page * template for the profile editing page * link to edit profile in the welcome page still needs * thorough inspection to see if it makes sense * tests * ? --- .../templates/mediagoblin/edit/edit_profile.html | 35 ++++++++++++++++++++++ mediagoblin/templates/mediagoblin/root.html | 3 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 mediagoblin/templates/mediagoblin/edit/edit_profile.html (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html new file mode 100644 index 00000000..9f6667fd --- /dev/null +++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html @@ -0,0 +1,35 @@ +{# +# 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 {{ user }}

+ +
+
+ {{ wtforms_util.render_divs(form) }} +
+ +
+
+
+{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index e5344e08..7af572b0 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -23,7 +23,8 @@ {% if request.user %}

- Submit an item. + Submit an item + Edit profile

{% else %} -- cgit v1.2.3 From 0bf340727e82ffdb03196a5a9a8ff94c7d4ec0f7 Mon Sep 17 00:00:00 2001 From: cfdv Date: Sat, 18 Jun 2011 21:30:56 -0500 Subject: enables entering user details including website url and bio fixes usage of objects. still need to display the data on user page --- mediagoblin/templates/mediagoblin/edit/edit_profile.html | 2 +- mediagoblin/templates/mediagoblin/root.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html index 9f6667fd..63bf013f 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_profile.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html @@ -20,7 +20,7 @@ {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} {% block mediagoblin_content %} -

Edit details for {{ user }}

+

Edit details for {{ user['username'] }}

Submit an item - Edit profile + Edit profile

{% else %} -- cgit v1.2.3 From 699b5475806c43af339d48408a7ea04ae9027c1a Mon Sep 17 00:00:00 2001 From: cfdv Date: Sat, 18 Jun 2011 22:24:32 -0500 Subject: enables primitive display of profile data on user page --- .../templates/mediagoblin/user_pages/user.html | 2 ++ .../templates/mediagoblin/utils/profile.html | 35 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 mediagoblin/templates/mediagoblin/utils/profile.html (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index b3708c85..f7a9f3c9 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -27,6 +27,8 @@ {% block mediagoblin_content -%} {% if user %}

User page for '{{ user.username }}'

+ + {% include "mediagoblin/utils/profile.html" %} {% include "mediagoblin/utils/object_gallery.html" %} diff --git a/mediagoblin/templates/mediagoblin/utils/profile.html b/mediagoblin/templates/mediagoblin/utils/profile.html new file mode 100644 index 00000000..b3f5f0f8 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/utils/profile.html @@ -0,0 +1,35 @@ +{# +# 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 . +#} + +{% block profile_content -%} +
+
    + {% if user.url %} +
  • + homepage +
  • + {% endif %} + + {% if user.bio %} +
  • + {{ user.bio }} +
  • + {% endif %} +
+
+{% endblock %} -- cgit v1.2.3 From b9f097a6f91fbe773d5f5dcbb7d904758efeebc1 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 21 Jun 2011 23:25:15 -0500 Subject: Indenting some sections between if / else blocks in root.html --- mediagoblin/templates/mediagoblin/root.html | 30 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index 697ac15b..550e0847 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -22,23 +22,21 @@

{% trans %}Welcome to GNU MediaGoblin!{% endtrans %}

{% if request.user %} -

- Submit an item - Edit profile -

- +

+ Submit an item + Edit profile +

{% else %} -

- If you have an account, you can - Login. -

-

- If you don't have an account, please - Register. -

- +

+ If you have an account, you can + Login. +

+

+ If you don't have an account, please + Register. +

{% endif %} {# temporarily, an "image gallery" that isn't one really ;) #} -- cgit v1.2.3 From d220f87c120e4c8627a80adaa6fab18ebe85669f Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 21 Jun 2011 23:26:45 -0500 Subject: I don't think we need the username to be part of the profile editing URL --- mediagoblin/templates/mediagoblin/root.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index 550e0847..7261f4fc 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -24,9 +24,7 @@ {% if request.user %}

Submit an item - Edit profile + Edit profile

{% else %}

-- cgit v1.2.3