aboutsummaryrefslogtreecommitdiffstats
path: root/ui-repolist.c
Commit message (Collapse)AuthorAgeLines
* Move cgit_repo into cgit_contextGravatar Lars Hjemli2008-02-16-15/+15
| | | | | | | | This removes the global variable which is used to keep track of the currently selected repository, and adds a new variable in the cgit_context structure. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add all config variables into struct cgit_contextGravatar Lars Hjemli2008-02-16-9/+9
| | | | | | | | This removes another big set of global variables, and introduces the cgit_prepare_context() function which populates a context-variable with compile-time default values. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Fix html error detected by test-suiteGravatar Lars Hjemli2007-11-11-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add search parameters to cgit_log_linkGravatar Lars Hjemli2007-11-03-1/+2
| | | | | | This makes the [prev] and [next] links work correctly on search results. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add ofs argument to cgit_log_link and use it in ui-log.cGravatar Lars Hjemli2007-06-30-1/+1
| | | | | | | This fixes a bug in the prev/next links on the log page: when on the default branch the links to prev/next page would contain h=(null). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add setting to enable/disable extra links on index pageGravatar Lars Hjemli2007-06-19-12/+23
| | | | | | | | | | The summary/log/tree links displayed for each repository on the index page lost some of their purpose when the header menu was added, so this commit introduces the parameter 'enable-index-links' which must be set to 1 to enable these links. Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Change S/L/T to summary/log/treeGravatar Lars Hjemli2007-06-19-4/+4
| | | | | | | | In yet another attempt at better usability, the cryptic S/L/T links are changed to show their full name. Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Change "files" to "tree"Gravatar Lars Hjemli2007-06-19-1/+1
| | | | | | | | This renames the menu link and the shortcut on the repo index page from the strange "files" to the more gittish "tree". Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add git_log_link() and fix bug in generic repolink functionGravatar Lars Hjemli2007-06-17-3/+1
| | | | | | | | | | | The generic repolink function compared head with cgit_query_head, which almost always would be the same pointer. The test now compares with repo.defbranch, which is the wanted behavour. Bug discovered while adding cgit_log_link(), so this commit also contain that change. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add and use cgit_tree_link()Gravatar Lars Hjemli2007-06-17-19/+16
| | | | | | | This creates a new function used to generate links to 'tree' page and uses the function everywhere a link to the 'tree' page is generated. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Remove unused variable from ui-repolist.c:read_agefile()Gravatar Lars Hjemli2007-05-24-1/+0
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show time since last change on index pageGravatar Lars Hjemli2007-05-23-1/+39
| | | | | | | | | | | | | | | | | | | | When creating the index page, an optional file can be scanned per repository to obtain a timestamp for last modification within the repo. If such a file cannot be found, st_mtime for repo.defbranch is used instead. This information is then printed in a new column, "Idle", using the new function cgit_print_age(). The new parameter "repo.agefile" can be used to specify (globally) a relative path to scan (default value is "info/web/last-modified"). The content of the "last-modified" file can be generated by the post-receive hook with a command like this: git-for-each-ref --format="%(committerdate)" --sort=-committerdate \ --count=1 > $GIT_DIR/info/web/last-modified Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make frontpage friendlierGravatar Lars Hjemli2007-05-21-13/+11
| | | | | | | This is an attempt to make the index page more usable by changing how repo groups and repo links are displayed. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'repogroups'Gravatar Lars Hjemli2007-05-21-0/+10
|\ | | | | | | | | | | | | * repogroups: Adjust apperance of repogroup headers Don't highlight repogroup headings Teach cgit how to group repositories by category
| * Don't highlight repogroup headingsGravatar Lars Hjemli2007-05-19-1/+1
| | | | | | | | | | | | Specify class='nohover' to avoid highlighting this row. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * Teach cgit how to group repositories by categoryGravatar Lars Hjemli2007-05-19-0/+10
| | | | | | | | | | | | | | | | | | The new parameter 'repo.group' is used to set the repository group for the following repositores. Whenever this parameter changes value, a subheading is generated in the index page (printing the current value of repo.group). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Teach cgit howto include an external file on index page.Gravatar Lars Hjemli2007-05-19-0/+5
|/ | | | | | | The new parameter index-header can be used to name an external file which will be included verbatim at the top of the index page. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Restrict length of repo description on repolist pageGravatar Lars Hjemli2007-05-16-1/+1
| | | | | | | | | | If any repo has a very long description, all repos suffer since the repo-links in the right-most column gets pushed out of sight. Fix it by introducing max-repodesc-length parameter in cgitrc, and default to 60 chars. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add C D L and T links to index pageGravatar Lars Hjemli2007-05-16-1/+15
| | | | | | | | | These are of course Commit, Diff, Log and Tree pages, all accessed w.o. specifying refname or sha1. Sadly, the layout is neither pretty nor accessible. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Layout updateGravatar Lars Hjemli2007-02-21-1/+0
|
* Read repo-info from /etc/cgitrcGravatar Lars Hjemli2007-02-05-31/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes cgit read all repo-info from the configfile, instead of scanning for possible git-dirs below a common root path. This is primarily done to get better security (separate physical path from logical repo-name). In /etc/cgitrc each repo is registered with the following keys: repo.url repo.name repo.path repo.desc repo.owner Note: *Required keys are repo.url and repo.path, all others are optional *Each occurrence of repo.url starts a new repository registration *Default value for repo.name is taken from repo.url *The value of repo.url cannot contain characters with special meaning for urls (i.e. one of /?%&), while repo.name can contain anything. Example: repo.url=cgit-pub repo.name=cgit/public repo.path=/pub/git/cgit repo.desc=My public cgit repo repo.owner=Lars Hjemli repo.url=cgit-priv repo.name=cgit/private repo.path=/home/larsh/src/cgit/.git repo.desc=My private cgit repo repo.owner=Lars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Cleanup table listingsGravatar Lars Hjemli2007-01-28-1/+1
| | | | | | Make the output for <table class='list'> a bit nicer Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
* Add generic support for search box in page headerGravatar Lars Hjemli2006-12-28-1/+1
| | | | | | | This adds the ability to show a search box in any pageheader with correct href and hidden form data, but does not enable the box on any pages. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Minor style fixesGravatar Lars Hjemli2006-12-22-2/+5
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move functions for repolist output into ui-repolist.cGravatar Lars Hjemli2006-12-12-0/+60
Signed-off-by: Lars Hjemli <hjemli@gmail.com>