[PATCH v2 0/8] ui-repolist: Support additional formatting for sections

Tim Nordell tim.nordell at logicpd.com
Sat Mar 5 00:24:48 CET 2016

On our internal server we have over 2,000 repositories, primarily due to
mirroring external repositories locally.  We patched cgit to make navigation
a little easier by doing the following:

 - Make sections clickable (via a section filter)
 - Collapse repository listing to just sections when the repository listing
   is over 1 page worth of repositories

The patchset here contains this modification and allows it to be enabled
(or disabled) via configuration.

You can see an example of this UI over here: http://git.logicpd.com

(Note: That is running an older patched version not containing the changes
here presently but has the same presentation.)

Changes since v1:
 - Split apart patches into smaller discrete patches
 - Removed NULL check around open and close filter
 - Misc. style issues
 - Made parameter orders for repolist_ctx vs cgit_repo more consistent
   across routines

Tim Nordell (8):
  ui-repolist: Add section filter
  ui-repolist: Remove conditional around print_header()
  ui-repolist: Create context structure for cgit_print_repolist()
  ui-repolist: Move HTML generation into helper functions
  ui-repolist: Factor out logic for emitting a new section heading
  ui-repolist: Remove assignment of section to repolist_ctx
  ui-repolist: Restructure internal logic to be more extensible
  ui-repolist: Support a trimmed view when several sections are present

 cgit.c                      |   2 +
 cgit.h                      |   3 +-
 cgitrc.5.txt                |  12 ++
 filter.c                    |   1 +
 filters/section-example.lua |  33 ++++++
 ui-repolist.c               | 268 ++++++++++++++++++++++++++++++++------------
 6 files changed, 247 insertions(+), 72 deletions(-)
 create mode 100644 filters/section-example.lua


More information about the CGit mailing list