unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] contrib/nmbug/nmbug-status: added table of views
@ 2012-10-24  6:59 Tomi Ollila
  2012-10-24  6:59 ` [PATCH 2/2] contrib/nmbug/nmbug-status: combine thread messages Tomi Ollila
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tomi Ollila @ 2012-10-24  6:59 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

In latest configuration quite a few long views were added to the
Notmuch Patches page. To ease navigating to the views a 'Views'
section was added to the beginning of page containing hyperlink
to every view.
---
 contrib/nmbug/nmbug-status |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/contrib/nmbug/nmbug-status b/contrib/nmbug/nmbug-status
index 9a334cc..c663409 100755
--- a/contrib/nmbug/nmbug-status
+++ b/contrib/nmbug/nmbug-status
@@ -67,7 +67,7 @@ def print_view(title, query, comment):
     last['thread_id'] = ''
 
     if output_format == 'html':
-        print '<h3>%s</h3>' % title
+        print '<h3><a name="%s" />%s</h3>' % (title, title)
         print comment
         print 'The view is generated from the following query:'
         print '<blockquote>'
@@ -144,6 +144,12 @@ if output_format == 'html':
     print 'Generated: %s<br />' % datetime.datetime.utcnow().date()
     print 'For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>'
 
+    print '<h3>Views</h3>'
+    print '<ul>'
+    for view in config['views']:
+        print '<li><a href="#%(title)s">%(title)s</a></li>' % view
+    print '</ul>'
+
 for view in config['views']:
     print_view(**view)
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-24 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24  6:59 [PATCH 1/2] contrib/nmbug/nmbug-status: added table of views Tomi Ollila
2012-10-24  6:59 ` [PATCH 2/2] contrib/nmbug/nmbug-status: combine thread messages Tomi Ollila
2012-10-24  7:17 ` Tomi Ollila
2012-10-24 21:58 ` [PATCH 1/2] contrib/nmbug/nmbug-status: added table of views David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).