List for cgit developers and users
 help / color / mirror / Atom feed
* Default view
@ 2018-03-19 19:01 gnidorah
  2018-03-19 22:16 ` john
  0 siblings, 1 reply; 3+ messages in thread
From: gnidorah @ 2018-03-19 19:01 UTC (permalink / raw)


Hello.

How to set a default view? When I open repo link a summary view is opened by default, but I want to have tree view as default.

Thanks.


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

* Default view
  2018-03-19 19:01 Default view gnidorah
@ 2018-03-19 22:16 ` john
  2018-03-20 16:31   ` gnidorah
  0 siblings, 1 reply; 3+ messages in thread
From: john @ 2018-03-19 22:16 UTC (permalink / raw)


On Mon, Mar 19, 2018 at 10:01:58PM +0300, Alex Ivanov wrote:
> How to set a default view? When I open repo link a summary view is
> opened by default, but I want to have tree view as default.

You'll have to patch CGit if you want to do that, out of the box you can
set enable-index-links=1 in your cgitrc to add a tree link in the repo
list.

I don't think you can easily make the plain repo url display the tree
because there wouldn't be any way to get to the summary view without
further changes, but it should be possible to swap the
cgit_summary_link() call in ui-repolist.c to cgit_tree_link() so that
the primary link in the repo list points at the tree view.


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

* Default view
  2018-03-19 22:16 ` john
@ 2018-03-20 16:31   ` gnidorah
  0 siblings, 0 replies; 3+ messages in thread
From: gnidorah @ 2018-03-20 16:31 UTC (permalink / raw)


Got it. Thanks much for the answer!

20.03.2018, 01:16, "John Keeping" <john at keeping.me.uk>:
> On Mon, Mar 19, 2018 at 10:01:58PM +0300, Alex Ivanov wrote:
>> ?How to set a default view? When I open repo link a summary view is
>> ?opened by default, but I want to have tree view as default.
>
> You'll have to patch CGit if you want to do that, out of the box you can
> set enable-index-links=1 in your cgitrc to add a tree link in the repo
> list.
>
> I don't think you can easily make the plain repo url display the tree
> because there wouldn't be any way to get to the summary view without
> further changes, but it should be possible to swap the
> cgit_summary_link() call in ui-repolist.c to cgit_tree_link() so that
> the primary link in the repo list points at the tree view.


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

end of thread, other threads:[~2018-03-20 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 19:01 Default view gnidorah
2018-03-19 22:16 ` john
2018-03-20 16:31   ` gnidorah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).