Merge branch 'master' of github.com:beetletweezers/tweezers
commit
0acc84c197
|
@ -123,6 +123,13 @@ label { display: block; margin-bottom: 4px; font-weight: bold; }
|
|||
/* text editor */
|
||||
.editor { width: 500px; height: 600px; }
|
||||
|
||||
/* file tree */
|
||||
li.depth-1 { padding-left: 0px; }
|
||||
li.depth-2 { padding-left: 20px; }
|
||||
li.depth-3 { padding-left: 40px; }
|
||||
li.depth-4 { padding-left: 60px; }
|
||||
li.depth-5 { padding-left: 80px; }
|
||||
|
||||
|
||||
/* pagination */
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{ file.heading|safe }}
|
||||
=======================
|
||||
{% load projects_tags %}{{ file.heading|safe|headline }}
|
||||
|
||||
{{ file.content|safe }}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{{ project.name|safe }} v{{ project.version }}
|
||||
==================================
|
||||
{% load projects_tags %}{{ project.name|safe|headline }}
|
||||
|
||||
{{ project.description|safe }}
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
{% extends "projects/base_project_editing.html" %}
|
||||
|
||||
{% load projects_tags %}
|
||||
|
||||
{% block title %}Manage {{ project.name }}{% endblock %}
|
||||
|
||||
{% block content-header %}<h1>Project Files</h1>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for file in file_list %}
|
||||
<li><a href="{% url projects_file_edit project.slug file.id %}">{{ file.heading }}</a></li>
|
||||
{% for file in project|annotated_tree %}
|
||||
<li class="depth-{{ file.depth }}"><a href="{% url projects_file_edit project.slug file.id %}">{{ file.heading }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
@ -17,3 +17,7 @@ def annotated_tree(project, max_depth=99):
|
|||
walk_tree(obj.children.order_by('ordering'), depth+1)
|
||||
walk_tree(project.files.filter(parent__isnull=True).order_by('ordering'))
|
||||
return annotated
|
||||
|
||||
@register.filter
|
||||
def headline(headline_string):
|
||||
return '%s\n%s' % (headline_string, '=' * len(headline_string))
|
||||
|
|
Loading…
Reference in New Issue