From e1349d418ce4bd5957f8fe657c2ce80d2b502b81 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sun, 27 Aug 2017 19:35:08 +0100 Subject: views: In the summary, make the sections toggable As an experiment, make the sections of the summary to be toggable. This can help readability, although it's unclear if it's worth the additional complexity and could be removed later. --- views/commit-list.html | 2 +- views/summary.html | 30 +++++++++++++++--------------- views/tree-list.html | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'views') diff --git a/views/commit-list.html b/views/commit-list.html index 3af9838..94f1dd0 100644 --- a/views/commit-list.html +++ b/views/commit-list.html @@ -16,7 +16,7 @@ % end % end - +
% refs = repo.refs() % if not defined("commits"): diff --git a/views/summary.html b/views/summary.html index 652ee6e..d3388e6 100644 --- a/views/summary.html +++ b/views/summary.html @@ -5,6 +5,7 @@ + @@ -35,23 +36,25 @@ % end % if "master" in repo.branch_names(): -[master] /
-% kwargs = dict(repo = repo, tree=repo.tree("master"), -% treeroot="b/master/t", dirname=smstr.from_url("")) -% include tree-list **kwargs -
+
+ commits (master) +
% kwargs = dict(repo = repo, start_ref = "refs/heads/master", % limit = repo.info.commits_in_summary, % shorten = shorten, repo_root = ".", offset = 0) % include commit-list **kwargs
+
+ tree (master) +
+% kwargs = dict(repo = repo, tree=repo.tree("master"), +% treeroot="b/master/t", dirname=smstr.from_url("")) +% include tree-list **kwargs +
% end -
- - - - +
branches
+
branches
% for b in repo.branch_names(): @@ -67,11 +70,8 @@ % tags = list(repo.tags()) % if tags: -
{{b}}
- - - - +
tags
+
tags
% for name, obj_id in tags: diff --git a/views/tree-list.html b/views/tree-list.html index 5eea1aa..70f032a 100644 --- a/views/tree-list.html +++ b/views/tree-list.html @@ -1,4 +1,4 @@ -
{{name}}
+
% key_func = lambda (t, n, s): (t != 'tree', n.raw) % for type, name, size in sorted(tree.ls(dirname.raw), key = key_func): -- cgit v1.2.3