diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-14 16:14:19 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-24 16:52:48 -0700 |
commit | 744f1c83b9c94a82612c981ec56782f3db457357 (patch) | |
tree | 78502d15d31e62a4f42b73e208c6eeb49a439847 /mediagoblin/templates | |
parent | b56b6b1e77cc01aa1ebebd1c6c594ec79cb4d8c1 (diff) | |
download | mediagoblin-744f1c83b9c94a82612c981ec56782f3db457357.tar.lz mediagoblin-744f1c83b9c94a82612c981ec56782f3db457357.tar.xz mediagoblin-744f1c83b9c94a82612c981ec56782f3db457357.zip |
add a check for authentication plugin on startup and respond according to no_auth config option. allows instance to be run w/o authentication
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/base.html | 2 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html | 36 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/media.html | 2 |
3 files changed, 23 insertions, 17 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 5e2898f9..d9ef34ae 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -67,7 +67,7 @@ {% trans %}Verify your email!{% endtrans %}</a> or <a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a> {% endif %} - {%- else %} + {%- elif auth %} <a href="{{ request.urlgen('mediagoblin.auth.login') }}?next={{ request.base_url|urlencode }}"> {%- trans %}Log in{% endtrans -%} diff --git a/mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html b/mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html index 544ee146..26153694 100644 --- a/mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html +++ b/mediagoblin/templates/mediagoblin/bits/frontpage_welcome.html @@ -17,19 +17,25 @@ #} {% if request.user %} - <h1>{% trans %}Explore{% endtrans %}</h1> -{% else %} - <h1>{% trans %}Hi there, welcome to this MediaGoblin site!{% endtrans %}</h1> - <img class="right_align" src="{{ request.staticdirect('/images/frontpage_image.png') }}" /> - <p>{% trans %}This site is running <a href="http://mediagoblin.org">MediaGoblin</a>, an extraordinarily great piece of media hosting software.{% endtrans %}</p> - <p>{% trans %}To add your own media, place comments, and more, you can log in with your MediaGoblin account.{% endtrans %}</p> - {% if allow_registration %} - <p>{% trans %}Don't have one yet? It's easy!{% endtrans %}</p> - {% trans register_url=request.urlgen('mediagoblin.auth.register') -%} - <a class="button_action_highlight" href="{{ register_url }}">Create an account at this site</a> - or - <a class="button_action" href="http://wiki.mediagoblin.org/HackingHowto">Set up MediaGoblin on your own server</a> - {%- endtrans %} + <h1>{% trans %}Explore{% endtrans %}</h1> + {% else %} + <h1>{% trans %}Hi there, welcome to this MediaGoblin site!{% endtrans %}</h1> + <img class="right_align" src="{{ request.staticdirect('/images/frontpage_image.png') }}" /> + <p>{% trans %}This site is running <a href="http://mediagoblin.org">MediaGoblin</a>, an extraordinarily great piece of media hosting software.{% endtrans %}</p> + {% if auth %} + <p>{% trans %}To add your own media, place comments, and more, you can log in with your MediaGoblin account.{% endtrans %}</p> + {% if allow_registration %} + <p>{% trans %}Don't have one yet? It's easy!{% endtrans %}</p> + {% trans register_url=request.urlgen('mediagoblin.auth.register') -%} + <a class="button_action_highlight" href="{{ register_url }}">Create an account at this site</a> + or + {%- endtrans %} + {% endif %} + {% endif %} + {% trans %} + <a class="button_action" href="http://wiki.mediagoblin.org/HackingHowto">Set up MediaGoblin on your own server</a> + {%- endtrans %} + + <div class="clear"></div> {% endif %} - <div class="clear"></div> -{% endif %} + diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 92c01c48..08e9d8ea 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -86,7 +86,7 @@ <p>{{ media.description_html }}</p> {% endautoescape %} {% if comments %} - {% if app_config['allow_comments'] %} + {% if app_config['allow_comments'] and auth %} <a {% if not request.user %} href="{{ request.urlgen('mediagoblin.auth.login') }}" |