List for cgit developers and users
 help / color / Atom feed
* [PATCH 1/1] ui-tree: provide link to about page for petty formatting
@ 2018-12-28 23:15 list
  2019-01-02  8:22 ` [PATCH 1/1] ui-tree: add about link in tree view list list
  2019-01-03  7:56 ` [PATCH 1/1] ui-tree: provide link to about page for petty formatting 
  0 siblings, 2 replies; 4+ messages in thread
From: list @ 2018-12-28 23:15 UTC (permalink / raw)


From: Christian Hesse <mail at eworm.de>

We have an ongoing discussion about display filters and pretty
formatting in tree view. How about providing a link to about page
for petty formatting?

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 ui-shared.c | 6 ++++++
 ui-shared.h | 3 +++
 ui-tree.c   | 3 +++
 3 files changed, 12 insertions(+)

diff --git a/ui-shared.c b/ui-shared.c
index 7a4c726..a955430 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -345,6 +345,12 @@ void cgit_tree_link(const char *name, const char *title, const char *class,
 	reporevlink("tree", name, title, class, head, rev, path);
 }
 
+void cgit_about_link(const char *name, const char *title, const char *class,
+		     const char *head, const char *rev, const char *path)
+{
+	reporevlink("about", name, title, class, head, rev, path);
+}
+
 void cgit_plain_link(const char *name, const char *title, const char *class,
 		     const char *head, const char *rev, const char *path)
 {
diff --git a/ui-shared.h b/ui-shared.h
index 6964873..e01d5d8 100644
--- a/ui-shared.h
+++ b/ui-shared.h
@@ -24,6 +24,9 @@ extern void cgit_tag_link(const char *name, const char *title,
 extern void cgit_tree_link(const char *name, const char *title,
 			   const char *class, const char *head,
 			   const char *rev, const char *path);
+extern void cgit_about_link(const char *name, const char *title,
+			    const char *class, const char *head,
+			    const char *rev, const char *path);
 extern void cgit_plain_link(const char *name, const char *title,
 			    const char *class, const char *head,
 			    const char *rev, const char *path);
diff --git a/ui-tree.c b/ui-tree.c
index df8ad82..7b45da6 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -108,6 +108,9 @@ static void print_object(const struct object_id *oid, char *path, const char *ba
 
 	cgit_print_layout_start();
 	htmlf("blob: %s (", oid_to_hex(oid));
+	cgit_about_link("about", NULL, NULL, ctx.qry.head,
+		        rev, path);
+	html(") (");
 	cgit_plain_link("plain", NULL, NULL, ctx.qry.head,
 		        rev, path);
 	if (ctx.cfg.enable_blame) {


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

* [PATCH 1/1] ui-tree: add about link in tree view list
  2018-12-28 23:15 [PATCH 1/1] ui-tree: provide link to about page for petty formatting list
@ 2019-01-02  8:22 ` list
  2019-01-03  7:56 ` [PATCH 1/1] ui-tree: provide link to about page for petty formatting 
  1 sibling, 0 replies; 4+ messages in thread
From: list @ 2019-01-02  8:22 UTC (permalink / raw)


From: Christian Hesse <mail at eworm.de>

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 ui-tree.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui-tree.c b/ui-tree.c
index 7b45da6..8b12e7c 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -254,6 +254,9 @@ static int ls_item(const struct object_id *oid, struct strbuf *base,
 	if (!S_ISGITLINK(mode))
 		cgit_plain_link("plain", NULL, "button", ctx.qry.head,
 				walk_tree_ctx->curr_rev, fullpath.buf);
+	if (!S_ISDIR(mode))
+		cgit_about_link("about", NULL, "button", ctx.qry.head,
+				walk_tree_ctx->curr_rev, fullpath.buf);
 	if (!S_ISDIR(mode) && ctx.cfg.enable_blame)
 		cgit_blame_link("blame", NULL, "button", ctx.qry.head,
 				walk_tree_ctx->curr_rev, fullpath.buf);


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

* [PATCH 1/1] ui-tree: provide link to about page for petty formatting
  2018-12-28 23:15 [PATCH 1/1] ui-tree: provide link to about page for petty formatting list
  2019-01-02  8:22 ` [PATCH 1/1] ui-tree: add about link in tree view list list
@ 2019-01-03  7:56 ` 
  2019-01-03  8:07   ` list
  1 sibling, 1 reply; 4+ messages in thread
From:  @ 2019-01-03  7:56 UTC (permalink / raw)


On Sat, 29 Dec 2018 at 00:17, Christian Hesse <list at eworm.de> wrote:
> From: Christian Hesse <mail at eworm.de>
>
> We have an ongoing discussion about display filters and pretty
> formatting in tree view. How about providing a link to about page
> for petty formatting?

s/petty/pretty/ ?

Best regards,
Bj?rn Forsman


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

* [PATCH 1/1] ui-tree: provide link to about page for petty formatting
  2019-01-03  7:56 ` [PATCH 1/1] ui-tree: provide link to about page for petty formatting 
@ 2019-01-03  8:07   ` list
  0 siblings, 0 replies; 4+ messages in thread
From: list @ 2019-01-03  8:07 UTC (permalink / raw)


Bj?rn Forsman <bjorn.forsman at gmail.com> on Thu, 2019/01/03 08:56:
> On Sat, 29 Dec 2018 at 00:17, Christian Hesse <list at eworm.de> wrote:
> > From: Christian Hesse <mail at eworm.de>
> >
> > We have an ongoing discussion about display filters and pretty
> > formatting in tree view. How about providing a link to about page
> > for petty formatting?  
> 
> s/petty/pretty/ ?

Obviously... Thanks!
/me should stop typing too fast. :-p
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190103/4e3d3408/attachment.asc>


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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 23:15 [PATCH 1/1] ui-tree: provide link to about page for petty formatting list
2019-01-02  8:22 ` [PATCH 1/1] ui-tree: add about link in tree view list list
2019-01-03  7:56 ` [PATCH 1/1] ui-tree: provide link to about page for petty formatting 
2019-01-03  8:07   ` list

List for cgit developers and users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/cgit

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.cgit


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git