# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1280613488 18000 # Node ID f697817182d194017b92bce6358a14b75889cce7 # Parent 44b9f749cdb0320e31e0d2c1a8210e9c78c72657 Rename .html snippets to .djhtml diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/base.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/base.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,1 @@ +{% extends "base.djhtml" %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/base.html --- a/templates/snippet/base.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{% extends "base.djhtml" %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_details.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/snippet_details.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,173 @@ +{% extends "snippet/base.djhtml" %} +{% load mptt_tags %} +{% load i18n %} + +{% block extrahead %} + {% if request.session.userprefs %} + + {% endif %} +{% endblock %} + +{% block title %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %} +{% block headline %} +

+ {% trans "Snippet" %} #{{ snippet.pk }} + {% if snippet.parent_id %} + {% blocktrans with snippet.parent.get_absolute_url as parent_url and snippet.parent.id as parent_id %}(Copy of snippet #{{ parent_id }}){% endblocktrans %} + {% endif %} + {{ snippet.published|date:_("DATETIME_FORMAT") }} ({% trans "UTC" %}) +

+{% endblock %} +{% load snippet_tags %} + +{% block content %} + + +
+
+ TTL: {{ snippet.expires|timeuntil }} + — + {% if snippet.pk|in_list:request.session.snippet_list %} + Delete now! + — + {% endif %} + {% trans "Wordwrap" %} +
+

+ {% if snippet.title %}{{ snippet.title }}{% else %} {% trans "Snippet" %} #{{ snippet.id}}{% endif %} + {% if snippet.author %}{% blocktrans with snippet.author as author %}by {{ author }}{% endblocktrans %}{% endif %} +

+ +
+
+ + + + + +
{% for l in lines %}{{ forloop.counter }}{% endfor %}
{% for line in snippet.content_splitted %}
{% if line %}{{ line|safe }}{% else %} {% endif %}
{% endfor %}
+
+
+ +

{% trans "Write an answer" %} →

+ +
+{% endblock %} + + + +{% block sidebar %} +

{% trans "History" %}

+ +
+
+ {% for tree_item,structure in tree|tree_info %} + {% if structure.new_level %}
  • {% else %}
  • {% endif %} +
    + + + + + {% ifequal snippet tree_item %} + {% trans "Snippet" %} #{{ tree_item.id }} + {% else %} + {% trans "Snippet" %} #{{ tree_item.id }} + {% endifequal %} +
    + {% for level in structure.closed_levels %}
{% endfor %} + {% endfor %} +
+ +
+
+
+ +

{% trans "Options" %}

+

{% trans "View raw" %}

+{% endblock %} + +{% block script_footer %} + + + +{% endblock %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_details.html --- a/templates/snippet/snippet_details.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -{% extends "snippet/base.html" %} -{% load mptt_tags %} -{% load i18n %} - -{% block extrahead %} - {% if request.session.userprefs %} - - {% endif %} -{% endblock %} - -{% block title %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %} -{% block headline %} -

- {% trans "Snippet" %} #{{ snippet.pk }} - {% if snippet.parent_id %} - {% blocktrans with snippet.parent.get_absolute_url as parent_url and snippet.parent.id as parent_id %}(Copy of snippet #{{ parent_id }}){% endblocktrans %} - {% endif %} - {{ snippet.published|date:_("DATETIME_FORMAT") }} ({% trans "UTC" %}) -

-{% endblock %} -{% load snippet_tags %} - -{% block content %} - - -
-
- TTL: {{ snippet.expires|timeuntil }} - — - {% if snippet.pk|in_list:request.session.snippet_list %} - Delete now! - — - {% endif %} - {% trans "Wordwrap" %} -
-

- {% if snippet.title %}{{ snippet.title }}{% else %} {% trans "Snippet" %} #{{ snippet.id}}{% endif %} - {% if snippet.author %}{% blocktrans with snippet.author as author %}by {{ author }}{% endblocktrans %}{% endif %} -

- -
-
- - - - - -
{% for l in lines %}{{ forloop.counter }}{% endfor %}
{% for line in snippet.content_splitted %}
{% if line %}{{ line|safe }}{% else %} {% endif %}
{% endfor %}
-
-
- -

{% trans "Write an answer" %} →

- -
-{% endblock %} - - - -{% block sidebar %} -

{% trans "History" %}

- -
-
- {% for tree_item,structure in tree|tree_info %} - {% if structure.new_level %}
  • {% else %}
  • {% endif %} -
    - - - - - {% ifequal snippet tree_item %} - {% trans "Snippet" %} #{{ tree_item.id }} - {% else %} - {% trans "Snippet" %} #{{ tree_item.id }} - {% endifequal %} -
    - {% for level in structure.closed_levels %}
{% endfor %} - {% endfor %} -
- -
-
-
- -

{% trans "Options" %}

-

{% trans "View raw" %}

-{% endblock %} - -{% block script_footer %} - - - -{% endblock %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_details_raw.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/snippet_details_raw.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,1 @@ +{{ snippet.content|safe }} \ No newline at end of file diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_details_raw.html --- a/templates/snippet/snippet_details_raw.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{{ snippet.content|safe }} \ No newline at end of file diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_diff.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/snippet_diff.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,13 @@ +{% load i18n %} + +

+ ({% trans "Close" %}) + {% blocktrans with fileA.get_absolute_url as filea_url and fileB.get_absolute_url as fileb_url and fileA.id as filea_id and fileB.id as fileb_id %} + Diff between + Snippet #{{ filea_id }} + and + Snippet #{{ fileb_id }} + {% endblocktrans %} +

+ +
{{ difftext|safe }}
diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_diff.html --- a/templates/snippet/snippet_diff.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -{% load i18n %} - -

- ({% trans "Close" %}) - {% blocktrans with fileA.get_absolute_url as filea_url and fileB.get_absolute_url as fileb_url and fileA.id as filea_id and fileB.id as fileb_id %} - Diff between - Snippet #{{ filea_id }} - and - Snippet #{{ fileb_id }} - {% endblocktrans %} -

- -
{{ difftext|safe }}
diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_form.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/snippet_form.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,19 @@ +{% load i18n %} +
+{% csrf_token %} +
    + {% for field in snippet_form %} +
  1. + {{ field.errors }} + {{ field.label_tag }} + {{ field }} + {% if request.session.userprefs.display_all_lexer %} + {% ifequal field.name "lexer" %} + + {% endifequal %} + {% endif %} +
  2. + {% endfor %} +
  3. +
+
diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_form.html --- a/templates/snippet/snippet_form.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -{% load i18n %} -
-{% csrf_token %} -
    - {% for field in snippet_form %} -
  1. - {{ field.errors }} - {{ field.label_tag }} - {{ field }} - {% if request.session.userprefs.display_all_lexer %} - {% ifequal field.name "lexer" %} - - {% endifequal %} - {% endif %} -
  2. - {% endfor %} -
  3. -
-
diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_list.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/snippet_list.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,26 @@ +{% extends "snippet/base.djhtml" %} +{% load i18n %} + +{% block title %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %} +{% block headline %} +

{% blocktrans %}Your latest {{ snippets_max }} snippets{% endblocktrans %}

+{% endblock %} + +{% block content %} + {% if snippet_list %} + {% for snippet in snippet_list %} +

+ {% trans "Snippet" %} #{{ snippet.pk }} + ~ {{ snippet.published|date:_("DATETIME_FORMAT") }} +

+

{{ snippet.content|truncatewords:40 }}

+ {% endfor %} + {% else %} +

{% trans "No snippets available." %}

+ {% endif %} + + +
+ {% trans "DATA_STORED_IN_A_COOKIE_HINT" %} +
+{% endblock %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_list.html --- a/templates/snippet/snippet_list.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -{% extends "snippet/base.html" %} -{% load i18n %} - -{% block title %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %} -{% block headline %} -

{% blocktrans %}Your latest {{ snippets_max }} snippets{% endblocktrans %}

-{% endblock %} - -{% block content %} - {% if snippet_list %} - {% for snippet in snippet_list %} -

- {% trans "Snippet" %} #{{ snippet.pk }} - ~ {{ snippet.published|date:_("DATETIME_FORMAT") }} -

-

{{ snippet.content|truncatewords:40 }}

- {% endfor %} - {% else %} -

{% trans "No snippets available." %}

- {% endif %} - - -
- {% trans "DATA_STORED_IN_A_COOKIE_HINT" %} -
-{% endblock %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_new.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/snippet_new.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,39 @@ +{% extends "snippet/base.djhtml" %} +{% load i18n %} + +{% block title %}{% trans "New snippet" %}{% endblock %} +{% block headline %}

{% trans "Paste a new snippet" %}

{% endblock %} + +{% block content %} +

{% trans "New snippet" %}

+ {% include "snippet/snippet_form.djhtml" %} +{% endblock %} + + +{% block sidebar %} +

{% trans "DPASTE_HOMEPAGE_TITLE" %}

+

{% trans "DPASTE_HOMEPAGE_DESCRIPTION" %}

+{% endblock %} + + +{% block script_footer %} + + +{% endblock %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/snippet_new.html --- a/templates/snippet/snippet_new.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -{% extends "snippet/base.html" %} -{% load i18n %} - -{% block title %}{% trans "New snippet" %}{% endblock %} -{% block headline %}

{% trans "Paste a new snippet" %}

{% endblock %} - -{% block content %} -

{% trans "New snippet" %}

- {% include "snippet/snippet_form.html" %} -{% endblock %} - - -{% block sidebar %} -

{% trans "DPASTE_HOMEPAGE_TITLE" %}

-

{% trans "DPASTE_HOMEPAGE_DESCRIPTION" %}

-{% endblock %} - - -{% block script_footer %} - - -{% endblock %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/userprefs.djhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/snippet/userprefs.djhtml Sat Jul 31 16:58:08 2010 -0500 @@ -0,0 +1,27 @@ +{% extends "snippet/base.djhtml" %} +{% load i18n %} + +{% block headline %} +

{% trans "User Settings" %}

+{% endblock %} + +{% block content %} + {% if settings_saved %} +
+ {% trans "USER_PREFS_SAVED_SUCCESSFULLY" %} +
+ {% endif %} + +

{% trans "User Settings" %}

+ +
+
    + {{ settings_form.as_ul }} +
  1. +
+
+ +
+ {% trans "DATA_STORED_IN_A_COOKIE_HINT" %} +
+{% endblock %} diff -r 44b9f749cdb0 -r f697817182d1 templates/snippet/userprefs.html --- a/templates/snippet/userprefs.html Thu Jul 29 12:04:51 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -{% extends "snippet/base.html" %} -{% load i18n %} - -{% block headline %} -

{% trans "User Settings" %}

-{% endblock %} - -{% block content %} - {% if settings_saved %} -
- {% trans "USER_PREFS_SAVED_SUCCESSFULLY" %} -
- {% endif %} - -

{% trans "User Settings" %}

- -
-
    - {{ settings_form.as_ul }} -
  1. -
-
- -
- {% trans "DATA_STORED_IN_A_COOKIE_HINT" %} -
-{% endblock %}