* [PATCH] repolist pagination changes
@ 2011-11-13 22:08 jamie.couture
2012-01-04 17:44 ` [REROLL v2] jamie.couture
0 siblings, 1 reply; 5+ messages in thread
From: jamie.couture @ 2011-11-13 22:08 UTC (permalink / raw)
From: Jamie Couture <jamie.couture at gmail.com>
bold the current page we're viewing
Signed-off-by: Jamie Couture <jamie.couture at gmail.com>
---
cgit.css | 4 ++++
ui-repolist.c | 11 +++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/cgit.css b/cgit.css
index 55afa94..a9946d6 100644
--- a/cgit.css
+++ b/cgit.css
@@ -550,6 +550,10 @@ div.pager a {
margin: 0em 0.5em;
}
+div.pager .current {
+ font-weight: bold;
+}
+
span.age-mins {
font-weight: bold;
color: #080;
diff --git a/ui-repolist.c b/ui-repolist.c
index 25c36ce..7619dcd 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -120,11 +120,14 @@ void print_header(int columns)
void print_pager(int items, int pagelen, char *search)
{
- int i;
+ int i, ofs;
+ char *class = NULL;
html("<div class='pager'>");
- for(i = 0; i * pagelen < items; i++)
- cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
- search, i * pagelen);
+ for(i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) {
+ class = (ctx.qry.ofs == ofs) ? "current" : NULL;
+ cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), class,
+ search, ofs);
+ }
html("</div>");
}
--
1.7.6
^ permalink raw reply [flat|nested] 5+ messages in thread
* [REROLL v2]
2011-11-13 22:08 [PATCH] repolist pagination changes jamie.couture
@ 2012-01-04 17:44 ` jamie.couture
2012-01-04 17:44 ` [PATCH v2] repolist pagination changes jamie.couture
0 siblings, 1 reply; 5+ messages in thread
From: jamie.couture @ 2012-01-04 17:44 UTC (permalink / raw)
resubmit due to 7530d94f existing in 'stable', prior work was based on 'master';
'stable' merged to 'master'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] repolist pagination changes
2012-01-04 17:44 ` [REROLL v2] jamie.couture
@ 2012-01-04 17:44 ` jamie.couture
0 siblings, 0 replies; 5+ messages in thread
From: jamie.couture @ 2012-01-04 17:44 UTC (permalink / raw)
bold the current page we're viewing
Signed-off-by: Jamie Couture <jamie.couture at gmail.com>
---
cgit.css | 4 ++++
ui-repolist.c | 11 +++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/cgit.css b/cgit.css
index 3734ca7..b45d220 100644
--- a/cgit.css
+++ b/cgit.css
@@ -550,6 +550,10 @@ div.pager a {
margin: 0em 0.5em;
}
+div.pager .current {
+ font-weight: bold;
+}
+
span.age-mins {
font-weight: bold;
color: #080;
diff --git a/ui-repolist.c b/ui-repolist.c
index a09a689..ea19afd 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -120,11 +120,14 @@ void print_header(int columns)
void print_pager(int items, int pagelen, char *search, char *sort)
{
- int i;
+ int i, ofs;
+ char *class = NULL;
html("<div class='pager'>");
- for(i = 0; i * pagelen < items; i++)
- cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
- search, sort, i * pagelen);
+ for(i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) {
+ class = (ctx.qry.ofs == ofs) ? "current" : NULL;
+ cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), class,
+ search, sort, ofs);
+ }
html("</div>");
}
--
1.7.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Maintaining My Own Cgit Tree
@ 2012-09-27 1:39 Jason
2012-10-08 16:49 ` [PATCH] repolist pagination changes jamie.couture
0 siblings, 1 reply; 5+ messages in thread
From: Jason @ 2012-09-27 1:39 UTC (permalink / raw)
Hi everyone,
I haven't heard from Lars for almost 7 months now. I've contributed
chunks of code to cgit in the past, and I continue to improve it now,
but with no one to send patches to, I've just been maintaining my own
tree, with features such as better support for the latest gitolite,
among other fixes.
Until Lars appears on the scene again, I'm happy to aggregate a
patches from everyone in my tree, and then when he reemerges from
wherever he is, he'll have a nice unified place to start merging what
we've been up to during his absence.
If others like this plan, by all means resend to this thread the
patches and enhancements you've been working on.
You can see what I've added myself at: http://git.zx2c4.com/cgit
Thanks,
Jason Donenfeld
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] repolist pagination changes
2012-09-27 1:39 Maintaining My Own Cgit Tree Jason
@ 2012-10-08 16:49 ` jamie.couture
2012-10-08 21:39 ` Jason
0 siblings, 1 reply; 5+ messages in thread
From: jamie.couture @ 2012-10-08 16:49 UTC (permalink / raw)
bold the current page we're viewing
Signed-off-by: Jamie Couture <jamie.couture at gmail.com>
---
cgit.css | 4 ++++
ui-repolist.c | 11 +++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/cgit.css b/cgit.css
index 651a320..54da076 100644
--- a/cgit.css
+++ b/cgit.css
@@ -548,6 +548,10 @@ div#cgit div.pager a {
margin: 0em 0.5em;
}
+div#cgit div.pager .current {
+ font-weight: bold;
+}
+
div#cgit span.age-mins {
font-weight: bold;
color: #080;
diff --git a/ui-repolist.c b/ui-repolist.c
index 943eaab..46cbacf 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -123,11 +123,14 @@ void print_header(int columns)
void print_pager(int items, int pagelen, char *search, char *sort)
{
- int i;
+ int i, ofs;
+ char *class = NULL;
html("<div class='pager'>");
- for(i = 0; i * pagelen < items; i++)
- cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
- search, sort, i * pagelen);
+ for(i = 0, ofs = 0; ofs < items; i++, ofs = i * pagelen) {
+ class = (ctx.qry.ofs == ofs) ? "current" : NULL;
+ cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), class,
+ search, sort, ofs);
+ }
html("</div>");
}
--
1.7.11.4
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-08 21:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-13 22:08 [PATCH] repolist pagination changes jamie.couture
2012-01-04 17:44 ` [REROLL v2] jamie.couture
2012-01-04 17:44 ` [PATCH v2] repolist pagination changes jamie.couture
2012-09-27 1:39 Maintaining My Own Cgit Tree Jason
2012-10-08 16:49 ` [PATCH] repolist pagination changes jamie.couture
2012-10-08 21:39 ` Jason
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).