aboutsummaryrefslogtreecommitdiffstats
path: root/ui-summary.c
Commit message (Collapse)AuthorAgeLines
* Introduce html.hGravatar Lars Hjemli2008-03-18-0/+1
| | | | | | | | All html-functions can be quite easily separated from the rest of cgit, so lets do it; the only issue was html_filemode which uses some git-defined macros so the function is moved into ui-shared.c::cgit_print_filemode(). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move cgit_repo into cgit_contextGravatar Lars Hjemli2008-02-16-2/+2
| | | | | | | | 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-5/+5
| | | | | | | | 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>
* Introduce struct cgit_contextGravatar Lars Hjemli2008-02-16-3/+3
| | | | | | | | | This struct will hold all the cgit runtime information currently found in a multitude of global variables. The first cleanup removes all querystring-related variables. 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/+1
| | | | | | This makes the [prev] and [next] links work correctly on search results. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Change the cgit layoutGravatar Lars Hjemli2007-10-30-59/+6
| | | | | | | | | | | | | | | | | This modifies and hopefully improves the layout of all cgit pages: * Remove the header from all pages and replace it with a sidebar; most pages have sufficient width but many needs more height. * Add a dropdown-box to switch between branches, using a one-liner javascript to reload the current page in context of the selected branch. * Include refs found below refs/archives in the sidebar, appearing as a set of menuitems below a 'download' heading. * Include the brand new cgit logo Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make print_branch() handle refs not pointing at commitsGravatar Lars Hjemli2007-10-28-5/+11
| | | | | | | | The master branch of stable/linux-2.6.20 currently references a tag object, which makes print_branch() die with a segfault. This teaches print_branch() to handle such cases more gracefully. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Teach log search about --grep, --author and --committerGravatar Lars Hjemli2007-10-28-1/+1
| | | | | | | This makes the log searching more explicit, using a dropdown box to specify the commit field to match against. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Cleanup code introduced by the filter-refs topicGravatar Lars Hjemli2007-10-27-30/+19
| | | | | | | The functions used to print branches and tags were only half-done and somewhat confused. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add links to the new refs page from summary pageGravatar Lars Hjemli2007-10-27-0/+13
| | | | | | | If either branches or tags are filtered on the summary page, add a link to refs/heads and/or refs/tags right below the last branch/tag. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make cgit_print_branches()/cgit_print_tags() externalGravatar Lars Hjemli2007-10-27-2/+2
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for config param summary-branchesGravatar Lars Hjemli2007-10-27-3/+28
| | | | | | | | | This parameter can be used to specify max number of branches to show on the summary page (if not all branches will be displayed, the "most idle" branches are the ones to be pruned). The default value for this parameter is 0, which disables the pruning. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move logic for age comparision from cmp_tag_age into cmp_age()Gravatar Lars Hjemli2007-10-27-8/+13
| | | | | | Simple refactoring to enable later filtering of branches based on age. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for config param summary-tagsGravatar Lars Hjemli2007-10-27-3/+7
| | | | | | | This parameter can be used to specify max number of tags to show on the summary page. If not specified, all tags are printed. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Sort tags by ageGravatar Lars Hjemli2007-10-27-0/+18
| | | | | | | This adds a function to compare timestamps and then uses it as callback for qsort() before printing out tags. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use reflist to print tag infoGravatar Lars Hjemli2007-10-27-17/+19
| | | | | | | This updates ui-summary.c to use a reflist instead of for_each_tag_ref(), as a step towards more flexible tag handling (filtering/sorting). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use reflist to print branch infoGravatar Lars Hjemli2007-10-27-14/+16
| | | | | | | This updates ui-summary.c to use a reflist instead of for_each_branch_ref(), as a step towards more flexible branch handling (filtering/sorting). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add ui-tag.cGravatar Lars Hjemli2007-07-23-29/+4
| | | | | | | This file implements the tag-command, i.e. printing of annotated tags. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 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 cgit_commit_link() + support for id=sha1 to commit viewGravatar Lars Hjemli2007-06-17-9/+9
| | | | | | | | This adds a function to generate links to the commit page and extends said page to use id from querystring as primary revision specified (fallback to h). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add git_log_link() and fix bug in generic repolink functionGravatar Lars Hjemli2007-06-17-5/+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>
* Implemented configurable HEAD shortlog on summary page.Gravatar Ondrej Jirman2007-05-31-1/+7
| | | | | | | | | | This mirrors similiar functionality in gitweb. After clicking on project on projectlist you will immediatelly see quick summary of last N commits on HEAD. [lh: changed from HEAD to cgit_query_head] Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use &amp; instead of & in URLs.Gravatar Ondrej Jirman2007-05-31-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Close a <tr> properlyGravatar Lars Hjemli2007-05-24-1/+1
| | | | | | No reason to generate illegal html. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add repo.readme parameterGravatar Lars Hjemli2007-05-24-6/+8
| | | | | | | | | | This parameter can be used to specify a repo-specific includefile, which will then be printed on the summary page for the repo. If the parametervalue is a not an absolute path, it is taken to be relative to repo.path. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use cgit_print_age() on summary and log pagesGravatar Lars Hjemli2007-05-23-4/+4
| | | | | | Update the pages to show relative dates instead of yyyy-mm-dd hh:mm:ss Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add cgit_print_age() functionGravatar Lars Hjemli2007-05-23-2/+2
| | | | | | | This function can be used to print relative dates, just as in gitweb. Next step will be to actually use the new function. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Change commit-view to expect h parameter, not idGravatar Lars Hjemli2007-05-16-6/+10
| | | | | | The change makes the commit-page benefit from repo.defbranch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Do not alter incoming sha1 when handling the download refs.Gravatar Lars Hjemli2007-05-15-2/+5
| | | | | | | The code used to overwrite the const sha1 parameter just to avoid declaring an extra variable. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show tag heading even if first tag is of the lightweight kindGravatar Lars Hjemli2007-05-15-13/+19
| | | | | | | | | The tag printing code waited for valid tags before printing the table heading, but forgot to count unannotated tags. This fixes it. Noticed by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Specify static storage class for file-local declarationsGravatar Lars Hjemli2007-05-15-7/+7
| | | | | | | | Also fix some whitespace issues while at it. Noticed by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add links to enable downloading of tagged blobsGravatar Lars Hjemli2007-05-12-9/+65
| | | | | | | | | | | | All tags below refs/archives are shown on the repo summary page as download links. The links referes to the tagged objects, using the tag name as filename for download. This can be used to add shortcuts for release tarballs, documentation and other blobs stored in the object database, especially blobs that are not reachable during cloning. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Update to libgit 1.5.2-rc2Gravatar Lars Hjemli2007-05-09-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Layout updateGravatar Lars Hjemli2007-02-21-2/+4
|
* Add support for lightweight tagsGravatar Lars Hjemli2007-02-05-19/+33
| | | | | | | There is nothing bad about a tag that has no tag-object, but the old code didn't handle such tags correctly. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add parameter to adjust max message length in log listingsGravatar Lars Hjemli2007-01-28-1/+1
| | | | | | | | | The parameter "max-message-length" can be specified in cgitrc, default value is 60. This affects the log message shown in repo summary and shortlog. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Cleanup table listingsGravatar Lars Hjemli2007-01-28-2/+2
| | | | | | Make the output for <table class='list'> a bit nicer Signed-off-by: Lars Hjemli <larsh@slaptop.hjemli.net>
* Extend repo summary with tag listGravatar Lars Hjemli2007-01-17-8/+66
| | | | | | Show all tags in the repo below the branch list. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Only show first 80 characters of commit subject in log and summaryGravatar Lars Hjemli2006-12-22-2/+2
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Reformat code to avoid excessive line lengthsGravatar Lars Hjemli2006-12-17-2/+6
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add cgit_free_commitinfo() and use where neededGravatar Lars Hjemli2006-12-16-0/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move cgit_print_date into ui-shared, reuse in ui-summaryGravatar Lars Hjemli2006-12-16-9/+11
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Small layout adjustments to summary and blob viewGravatar Lars Hjemli2006-12-13-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add display of tree content w/ui-tree.cGravatar Lars Hjemli2006-12-13-1/+6
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move log-functions into ui-log.cGravatar Lars Hjemli2006-12-12-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Move repo summary functions into ui-summary.cGravatar Lars Hjemli2006-12-12-0/+55
Signed-off-by: Lars Hjemli <hjemli@gmail.com>