summaryrefslogtreecommitdiffstatshomepage
path: root/ui-shared.h (follow)
Commit message (Collapse)AuthorAgeLines
* Always #include corresponding .h in .c filesJohn Keeping2013-04-08-2/+0
| | | | | | | | | | | | While doing this, remove declarations from header files where the corresponding definition is declared "static" in order to avoid build errors. Also re-order existing headers in ui-*.c so that the file-specific header always comes immediately after "cgit.h", helping with future consistency. Signed-off-by: John Keeping <john@keeping.me.uk>
* Return const char * in cgit_{httpscheme, hosturl, rooturl}()Lukas Fleischer2013-04-08-3/+3
| | | | | | | | | | | | The return values of these functions are essentially constant and should never be modified. Note that this will introduce a compiler warning when we try to free the return value of any of these functions. However, given that all of these currently return statically allocated strings in some cases, they need to be refactored before this can be done anyway. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
* Merge branch 'lh/module-links'Lars Hjemli2012-03-18-0/+3
|\
| * ui-tree.c: add support for path-selected submodule linksLars Hjemli2011-06-15-0/+3
| | | | | | | | | | | | | | | | | | | | | | The current 'repo.module-link' option is sufficient when all gitlinks in a repository can be converted to commit links in a uniform way, but not when different submodules/paths needs different settings. This patch adds support for 'repo.module-link.<path>', which will be used for linking to submodules at paths matching one such entry. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Add sort parameter to pager of repo listTobias Grimm2012-01-03-1/+1
|/ | | | | | When the repolist is paged, the page-links are missing the sort parameter, causing the initial page to be custom sorted, but any clicked page will then be with the default sort order again.
* ui-commit: Preserve path limit in links to commit pageJohan Herland2010-06-19-1/+2
| | | | | | | | | | | This includes adding a path argument to cgit_commit_link() and updating all its callers. The callers from within the commit page (i.e. the "commit", "unidiff"/"side-by-side diff" and "parent" links) all preserve the path limit of the current commit page. All other callers pass NULL (i.e. no path limit). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-patch: Apply path limit to generated patchJohan Herland2010-06-19-1/+1
| | | | | | | | Also indicate in the comment section of the patch that a path limit was applied, too easily see when a generated patch is only partial. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-shared: Teach "breadcrumb" navigation to path limit display beneath tab barJohan Herland2010-06-19-0/+2
| | | | | | | | | | | | | | | When a path limit is in effect, and displayed directly beneath the tab bar, it should offer breadcrumb navigation (like what the 'tree' page does), to allow changing the path limit easily. Implementing this requires a robust way to link back to the current page with a changed ctx->qry.path, but without losing track of the other query arguments. This is solved by adding the new cgit_self_link() function, which is then invoked repeatedly by the new cgit_print_path_crumbs() function while manipulating ctx->qry.path. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-shared: Improve const-ness in APIJohan Herland2010-06-19-29/+40
| | | | | | | This is needed to prevent const-related warnings in later patches. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'ro/ssdiff'Lars Hjemli2009-12-08-2/+3
|\
| * Add possibility to switch between unidiff and side-by-side-diff.Ragnar Ouchterlony2009-09-16-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new config option side-by-side-diffs added, defaulting to 0, meaning unidiff. Also a query option (ss) is used toggle this. In the commit page you can switch between the two diff formats by clicking on the link on the "commit"-row, to the right of (patch). In the diff page you can switch by using the link at the start of the page. All commit-links and diff-links will remember the choice. Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Fix repolist search links with virtual rootGeoff Johnstone2009-09-20-0/+1
|/ | | | | Signed-off-by: Geoff Johnstone <geoff.johnstone@googlemail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* add cgit_httpscheme() -> http:// or https://Diego Ongaro2009-06-11-0/+1
|
* Merge branch 'lh/stats'Lars Hjemli2009-01-27-1/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: cgit.c cgit.css cgit.h ui-tree.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * ui-shared: externalize add_hidden_formfields()Lars Hjemli2008-12-07-1/+2
| | | | | | | | | | | | This function will be reused by ui-stats.c in the next commit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * ui-shared: add and use cgit_stats_link()Lars Hjemli2008-12-07-0/+2
| | | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | ui-log: add support for showing the full commit messageLars Hjemli2008-11-29-1/+1
|/ | | | | | | | | | | | | | | Some users prefer to see the full message, so to make these users happy the new querystring parameter "showmsg" can be used to print the full commit message per log entry. A link is provided in the log heading to make this function accessible, and all links and forms tries to preserve the users preference. Note: the new link is not displayed on the summary page since the point of the summary page is to be a summary, but it is still obeyed if specified manually. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-shared: add cgit_tag_link()Lars Hjemli2008-10-05-0/+2
| | | | | | | This function can be used to generate properly escaped links to the tag page. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-shared.c: add cgit_summary_link()Lars Hjemli2008-10-05-0/+1
| | | | | | | This function can be used to generate a link to the summary page for the currently active repo. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'lh/plain'Lars Hjemli2008-09-01-0/+2
|\ | | | | | | | | | | | | * lh/plain: Supply status description to html_status() ui-tree: link to plain view instead of blob view Implement plain view
| * ui-tree: link to plain view instead of blob viewLars Hjemli2008-08-06-0/+2
| | | | | | | | | | | | | | | | | | | | | | The urls for plain view makes it possible to download blobs without knowing their SHA1, but the function needs to be promoted and the link from tree view seems like a perfect fit. PS: Although hidden, the blob view still is nice for direct blob access so there's no point in removing it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Add atom-supportLars Hjemli2008-08-01-0/+1
|/ | | | | | | This enables a page which generates atom feeds for the current branch and path, heavily inspired by the atom-support in gitweb. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Added `local-time` option to cgitrcStefan Naewe2008-08-01-1/+1
| | | | | | | | | When `local-time` is set, commit, tag and patch timestamps will be printed in the servers timezone. Also, regardless of the value of `local-time`, these timestamps will now always show the timezone. Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add cgit_index_link() function with support for offsetLars Hjemli2008-05-03-0/+2
| | | | | | This function will be used to build a pager in ui-repolist. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Remove 'patch' link from tab, add to commit viewLars Hjemli2008-04-13-0/+2
| | | | | | | | | | It's a bit confusing to enter the patch view from the tab, since it has no layout. And the commit view has always lacked showing the commit id. Both of these warts are fixed by this commit, which adds a new header line in the commit view which shows the commit id as a 'permalink' to the current commit and also adds a link to the patch view of the current commit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add ui-shared.hLars Hjemli2008-03-24-0/+36
This is finally a proper headerfile for the shared ui-functions which used to reside in cgit.h Signed-off-by: Lars Hjemli <hjemli@gmail.com>