Skip to content

Commit

Permalink
Fixed URLs, now using url from future. Fixed position for login/logou…
Browse files Browse the repository at this point in the history
…t links.
  • Loading branch information
pmourelle committed Mar 5, 2013
1 parent 5726554 commit beaf5a8
Show file tree
Hide file tree
Showing 20 changed files with 87 additions and 61 deletions.
2 changes: 1 addition & 1 deletion website/ninja_web/common/static/common/css/styles.css

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions website/ninja_web/common/static/common/css/styles.less
Expand Up @@ -461,10 +461,10 @@ nav {
display: block;
height: 51px;
max-height: 51px;
padding: 7px 3px 7px 7px;
padding: 7px;

&:hover {
.box-shadow(inset -2px 0 20px @color_nav-hover);
.box-shadow(inset -2px 0 10px @color_nav-hover);
}

h3 {
Expand All @@ -474,6 +474,10 @@ nav {
a {
height: auto;
padding: 0px 0px 5px;

&:hover {
border: 0;
}
}

#logout {
Expand All @@ -487,8 +491,9 @@ nav {

a {
color: @color_marked2 + #111;
display: inline;
float: none;
display: inline-block;
float: right;
font-size: .7em;
padding: 0;
width: auto !important;
}
Expand Down
9 changes: 5 additions & 4 deletions website/ninja_web/plugins/templates/plugin-detail.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% load i18n show_stars %}
{% load url from future %}

{% block scripts %}
{{ block.super }}
Expand All @@ -15,7 +16,7 @@
{% if not user.is_authenticated %}
alert("You have to be registered to vote!");
{% else %}
rate_plugin(id, pos, {% url rate_plugin %});
rate_plugin(id, pos, {% url 'rate_plugin' %});
{% endif %}
}
</script>
Expand All @@ -32,12 +33,12 @@

{% if plugin %}
<h1>{{ plugin.name }}
<a class="right small" href="{% url plugins %}">Back to Plugins</a>
<a class="right small" href="{% url 'plugins' %}">Back to Plugins</a>
</h1>

<div class="framed">
<h2>{{ plugin.name }} <small>- version {{ plugin.version }}</small></h2>
<h3 class="author">by <u><a href="{% url user_detail plugin.user.username %}">{{ plugin.user }}</a></u></h3>
<h3 class="author">by <u><a href="{% url 'user_detail' plugin.user.username %}">{{ plugin.user }}</a></u></h3>

{% include "global/tags.html" with object=plugin %}
</div>
Expand Down Expand Up @@ -87,7 +88,7 @@ <h1>More info</h1>
{% else %}
<div class="section right small-width">
<h1>Hey you!</h1>
<h2>Checkout <a class="buttons" href="{% url plugins %}">Here</a> for plugins.</h2>
<h2>Checkout <a class="buttons" href="{% url 'plugins' %}">Here</a> for plugins.</h2>
</div>
{% endif %}

Expand Down
3 changes: 2 additions & 1 deletion website/ninja_web/plugins/templates/plugin-submit.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% load i18n %}
{% load url from future %}

{% block bodyclass %}plugin-form{% endblock %}

Expand Down Expand Up @@ -41,7 +42,7 @@ <h2>Submit your ninja plugin. Share your stuff!</h2>
<h1>Really Important (TOS)</h1>
<p>All the content available in our website <b>IS TOTALLY FREE AND OPEN SOURCED</b> under the <a href="http://gplv3.fsf.org">GPL v3</a> license. All plugins submitted with this form will be treated as free software under GPL v3.</p>
<a class="link-web" href="http://gplv3.fsf.org">More about GPL v3</a>
<a class="link-web" href="{% url plugins %}">Get back to Plugins</a>
<a class="link-web" href="{% url 'plugins' %}">Get back to Plugins</a>
</div>

</div><!-- /content -->
Expand Down
15 changes: 8 additions & 7 deletions website/ninja_web/plugins/templates/plugins.html
Expand Up @@ -2,6 +2,7 @@

{% load i18n show_stars %}
{% load pagination_tags %}
{% load url from future %}

{% block scripts %}
{{ block.super }}
Expand All @@ -16,7 +17,7 @@
{% if not user.is_authenticated %}
alert("You have to be registered to vote!");
{% else %}
rate_plugin(id, pos, {% url rate_plugin %});
rate_plugin(id, pos, {% url 'rate_plugin' %});
{% endif %}
}
</script>
Expand All @@ -42,7 +43,7 @@ <h2>Showing <span class="color_marked">All</span> plugins</h2>

{% for p in plugins %}
<li class="item" id="plugin_{{ p.id }}">

<div class="item-header">

<div class="options">
Expand All @@ -57,7 +58,7 @@ <h2>Showing <span class="color_marked">All</span> plugins</h2>
</div><!-- /options -->

<h3><a href="{{ p.get_absolute_url }}">{{ p.name }}</a></h3>
<h4>by <a href="{% url user_detail p.user.username %}">{{ p.user.username }}</a></h4>
<h4>by <a href="{% url 'user_detail' p.user.username %}">{{ p.user.username }}</a></h4>
</div><!-- /item-header -->

<div class="extract">
Expand All @@ -70,7 +71,7 @@ <h4>by <a href="{% url user_detail p.user.username %}">{{ p.user.username }}</a>

{% empty %}
<li class="item">
<p>There're no plugins submitted yet. <a href="{% url plugin_submit %}">Be the first one!!</a></p>
<p>There're no plugins submitted yet. <a href="{% url 'plugin_submit' %}">Be the first one!!</a></p>
</li>
{% endfor %}

Expand All @@ -82,13 +83,13 @@ <h4>by <a href="{% url user_detail p.user.username %}">{{ p.user.username }}</a>
<div class="section right small-width" id="submit-banner">
<h1>Plugins submitions</h1>
<a class="link-web" href="http://ninja-ide.readthedocs.org/en/latest/">Learn how to write a plugin</a>
<a class="link-web" href="{% url plugin_submit %}">Submit your plugin!</a>
<a class="link-web" href="{% url 'plugin_submit' %}">Submit your plugin!</a>
</div>

<div class="section right small-width">
<h1>Schemes submitions</h1>
<a class="link-web" href="{% url schemes %}">Check out the schemes!</a>
<a class="link-web" href="{% url scheme_submit %}">Submit your own scheme!</a>
<a class="link-web" href="{% url 'schemes' %}">Check out the schemes!</a>
<a class="link-web" href="{% url 'scheme_submit' %}">Submit your own scheme!</a>
</div>

</div><!-- /content -->
Expand Down
7 changes: 4 additions & 3 deletions website/ninja_web/schemes/templates/scheme-detail.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% load i18n show_stars %}
{% load url from future %}

{% block bodyclass %}scheme-detail{% endblock %}

Expand All @@ -11,11 +12,11 @@

{% if scheme %}
<h1>{{ scheme.name }}
<a class="right small" href="{% url schemes %}">Back to Schemes</a>
<a class="right small" href="{% url 'schemes' %}">Back to Schemes</a>
</h1>

<div class="framed">
<h3 class="author">by <u><a href="{% url user_detail scheme.user.username %}">{{ scheme.user }}</a></u></h3>
<h3 class="author">by <u><a href="{% url 'user_detail' scheme.user.username %}">{{ scheme.user }}</a></u></h3>

{% include "global/tags.html" with object=scheme %}
</div>
Expand Down Expand Up @@ -60,7 +61,7 @@ <h1>More info</h1>
{% else %}
<div class="section right small-width">
<h1>Hey you!</h1>
<h2>Checkout <a class="buttons" href="{% url schemes %}">Here</a> for schemes.</h2>
<h2>Checkout <a class="buttons" href="{% url 'schemes' %}">Here</a> for schemes.</h2>
</div>
{% endif %}

Expand Down
3 changes: 2 additions & 1 deletion website/ninja_web/schemes/templates/scheme-submit.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% load i18n %}
{% load url from future %}

{% block bodyclass %}scheme-form{% endblock %}

Expand Down Expand Up @@ -43,7 +44,7 @@ <h2>Submit your ninja scheme. Share your stuff!</h2>
<h1>Really Important (TOS)</h1>
<p>All the content available in our website <b>IS TOTALLY FREE AND OPEN SOURCED</b> under the <a href="http://gplv3.fsf.org">GPL v3</a> license. All schemes submitted with this form will be treated as free software under GPL v3.</p>
<a class="link-web" href="http://gplv3.fsf.org">More about GPL v3</a>
<a class="link-web" href="{% url schemes %}">Get back to Schemes</a>
<a class="link-web" href="{% url 'schemes' %}">Get back to Schemes</a>
</div>

</div><!-- /content -->
Expand Down
11 changes: 6 additions & 5 deletions website/ninja_web/schemes/templates/schemes.html
Expand Up @@ -2,6 +2,7 @@

{% load i18n show_stars %}
{% load pagination_tags %}
{% load url from future %}

{% block bodyclass %}schemes{% endblock %}

Expand All @@ -22,11 +23,11 @@ <h2>Showing <span class="color_marked">All</span> schemes</h2>

{% for scheme in schemes %}
<li class="item" id="scheme_{{ scheme.id }}">

<div class="item-header">

<h3><a href="{{ scheme.get_absolute_url }}">{{ scheme.name }}</a></h3>
<h4>by <a href="{% url user_detail scheme.user.username %}">{{ scheme.user.username }}</a></h4>
<h4>by <a href="{% url 'user_detail' scheme.user.username %}">{{ scheme.user.username }}</a></h4>
</div><!-- /item-header -->

<div class="extract">
Expand All @@ -43,7 +44,7 @@ <h4>by <a href="{% url user_detail scheme.user.username %}">{{ scheme.user.usern

{% empty %}
<li class="item">
<p>There're no schemes submitted yet. <a href="{% url scheme_submit %}">Be the first one!!</a></p>
<p>There're no schemes submitted yet. <a href="{% url 'scheme_submit' %}">Be the first one!!</a></p>
</li>
{% endfor %}

Expand All @@ -54,11 +55,11 @@ <h4>by <a href="{% url user_detail scheme.user.username %}">{{ scheme.user.usern

<div class="section right small-width" id="submit-banner">
<h1>Schemes submitions</h1>
<a class="link-web" href="{% url scheme_submit %}">Submit your scheme!</a>
<a class="link-web" href="{% url 'scheme_submit' %}">Submit your scheme!</a>
</div>

</div><!-- /content -->
<!--
<!--
{
"scoobygalletas1": "http://schemes.ninja-ide.googlecode.com/hg/schemes/scoobygalletas1.color",
"darker_scheme": "http://schemes.ninja-ide.googlecode.com/hg/schemes/darker_scheme.color",
Expand Down
3 changes: 1 addition & 2 deletions website/ninja_web/templates/base.html
Expand Up @@ -121,9 +121,8 @@ <h4>Certified Ninjas</h4>

<li id="nav-login">
{% if user.is_authenticated and user.username %}
<h3><a href="{% url user_detail user.username %}">My dojo</a></h3>
<h3><a href="{% url 'user_detail' user.username %}">My dojo</a></h3>
<h4>Hi {{ user.username|slice:"10" }}{% if user.username|length > 10 %}...{% endif %}
<br />
<a id="logout" href="{% url 'auth_logout' %}">Logout</a>
</h4>
{% else %}
Expand Down
4 changes: 3 additions & 1 deletion website/ninja_web/templates/global/tags.html
@@ -1,6 +1,8 @@
{% load url from future %}

<div class="item-tags">
{% for tag in object.get_tags %}
<a href="{% url filter_by_tag tag.id %}" alt="{{ tag }}" title="{{ tag }}">
<a href="{% url 'filter_by_tag' tag.id %}" alt="{{ tag }}" title="{{ tag }}">
{{ tag }}</a>{% if not forloop.last %}, {% endif %}
{% empty %}
<a href="#">It has no tags, can believe it?</a>
Expand Down
7 changes: 4 additions & 3 deletions website/ninja_web/templates/plugin-detail.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% load i18n show_stars %}
{% load url from future %}

{% block scripts %}
{{ block.super }}
Expand All @@ -15,7 +16,7 @@
{% if not user.is_authenticated %}
alert("You have to be registered to vote!");
{% else %}
rate_plugin(id, pos, {% url rate_plugin %});
rate_plugin(id, pos, {% url 'rate_plugin' %});
{% endif %}
}
</script>
Expand All @@ -32,12 +33,12 @@
<div class="section left big-width" id="plugins">

<h1>{{ plugin.name }}</h1>
<h3><a href="{% url user_detail plugin.user.username %}">{{ plugin.user }}</a></h3>
<h3><a href="{% url 'user_detail' plugin.user.username %}">{{ plugin.user }}</a></h3>
<h2>{{ plugin.short_description }}</h2>

<div class="item-tags">
{% for tag in plugin.get_tags %}
<a href="{% url filter_by_tag tag.id %}" alt="{{ tag }}" title="{{ tag }}">{{ tag }}</a>
<a href="{% url 'filter_by_tag' tag.id %}" alt="{{ tag }}" title="{{ tag }}">{{ tag }}</a>
{% endfor %}
</div>

Expand Down
11 changes: 6 additions & 5 deletions website/ninja_web/templates/profiles/email_form.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% load i18n %}
{% load url from future %}

{% block title %}{% trans "Change your password" %}{% endblock %}

Expand All @@ -12,19 +13,19 @@
{% if user.username == account.user.username %}
<ul id="box-nav">
<li class="first">
<a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a>
<a href="{% url 'userena_detail' user.username %}"><span>{% trans 'View profile' %}</span></a>
</li>

<li>
<a href="{% url userena_edit account.user.username %}">{% trans "Edit profile" %}</a>
<a href="{% url 'userena_edit' account.user.username %}">{% trans "Edit profile" %}</a>
</li>

<li>
<a href="{% url userena_password_change account.user.username %}">{% trans "Change password" %}</a>
<a href="{% url 'userena_password_change' account.user.username %}">{% trans "Change password" %}</a>
</li>

<li class="last selected">
<a href="{% url userena_email_change account.user.username %}">{% trans "Change email" %}</a>
<a href="{% url 'userena_email_change' account.user.username %}">{% trans "Change email" %}</a>
</li>
</ul>
{% endif %}
Expand All @@ -33,7 +34,7 @@

<fieldset>
<legend>{% trans "Change email address" %}</legend>

{{ form.as_p }}
</fieldset>
<input type="submit" value="{% trans "Change email" %}" />
Expand Down
9 changes: 5 additions & 4 deletions website/ninja_web/templates/profiles/password_form.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% load i18n %}
{% load url from future %}

{% block title %}{% trans "Change password" %}{% endblock %}

Expand All @@ -11,16 +12,16 @@
{% if user.username == account.user.username %}
<ul id="box-nav">
<li class="first">
<a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a>
<a href="{% url 'userena_detail' user.username %}"><span>{% trans 'View profile' %}</span></a>
</li>
<li>
<a href="{% url userena_edit account.user.username %}">{% trans "Edit profile" %}</a>
<a href="{% url 'userena_edit' account.user.username %}">{% trans "Edit profile" %}</a>
</li>
<li class="selected">
<a href="{% url userena_password_change account.user.username %}">{% trans "Change password" %}</a>
<a href="{% url 'userena_password_change' account.user.username %}">{% trans "Change password" %}</a>
</li>
<li class="last">
<a href="{% url userena_email_change account.user.username %}">{% trans "Change email" %}</a>
<a href="{% url 'userena_email_change' account.user.username %}">{% trans "Change email" %}</a>
</li>
</ul>
{% endif %}
Expand Down

0 comments on commit beaf5a8

Please sign in to comment.