diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-12-12 14:26:02 +0100 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-12-12 14:26:02 +0100 |
commit | 1059bc71871c14b813b0bb27b4601e2c2ac65acd (patch) | |
tree | a6a7dd636165c55021e878acb936697824144ef8 /templates | |
parent | dcc9a54fc8a1c52bb8cded28c4f445248bc597a6 (diff) | |
download | cerrado-1059bc71871c14b813b0bb27b4601e2c2ac65acd.tar.gz cerrado-1059bc71871c14b813b0bb27b4601e2c2ac65acd.tar.bz2 cerrado-1059bc71871c14b813b0bb27b4601e2c2ac65acd.zip |
feat: Add private label to the UI
Now private repository will have a private label on the list.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/gitlist.qtpl | 11 | ||||
-rw-r--r-- | templates/gitlist.qtpl.go | 115 |
2 files changed, 72 insertions, 54 deletions
diff --git a/templates/gitlist.qtpl b/templates/gitlist.qtpl index fa47008..fc047eb 100644 --- a/templates/gitlist.qtpl +++ b/templates/gitlist.qtpl @@ -18,9 +18,14 @@ type GitListPage struct { <div class="event-list"> {% for _, r := range p.Respositories %} <div class="event"> - <h4> - <a href="/{%s r.Name %}/">{%s r.Name %}</a> - </h4> + <div class="row"> + <div class="col-md"> + <a href="/{%s r.Name %}/">{%s r.Name %}</a> + </div> + <div class="col-md text-md-end"> + <small>{% if !r.Public %}private{% endif %}</small> + </div> + </div> </hr> <p>{%s r.Description %}</p> <p> diff --git a/templates/gitlist.qtpl.go b/templates/gitlist.qtpl.go index 601dbb2..07e5567 100644 --- a/templates/gitlist.qtpl.go +++ b/templates/gitlist.qtpl.go @@ -108,61 +108,74 @@ func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer, ctx context.Conte //line templates/gitlist.qtpl:19 qw422016.N().S(` <div class="event"> - <h4> - <a href="/`) -//line templates/gitlist.qtpl:22 + <div class="row"> + <div class="col-md"> + <a href="/`) +//line templates/gitlist.qtpl:23 qw422016.E().S(r.Name) -//line templates/gitlist.qtpl:22 +//line templates/gitlist.qtpl:23 qw422016.N().S(`/">`) -//line templates/gitlist.qtpl:22 +//line templates/gitlist.qtpl:23 qw422016.E().S(r.Name) -//line templates/gitlist.qtpl:22 +//line templates/gitlist.qtpl:23 qw422016.N().S(`</a> - </h4> + </div> + <div class="col-md text-md-end"> + <small>`) +//line templates/gitlist.qtpl:26 + if !r.Public { +//line templates/gitlist.qtpl:26 + qw422016.N().S(`private`) +//line templates/gitlist.qtpl:26 + } +//line templates/gitlist.qtpl:26 + qw422016.N().S(`</small> + </div> + </div> </hr> <p>`) -//line templates/gitlist.qtpl:25 +//line templates/gitlist.qtpl:30 qw422016.E().S(r.Description) -//line templates/gitlist.qtpl:25 +//line templates/gitlist.qtpl:30 qw422016.N().S(`</p> <p> <a href="/`) -//line templates/gitlist.qtpl:27 +//line templates/gitlist.qtpl:32 qw422016.E().S(r.Name) -//line templates/gitlist.qtpl:27 +//line templates/gitlist.qtpl:32 qw422016.N().S(`/log/`) -//line templates/gitlist.qtpl:27 +//line templates/gitlist.qtpl:32 qw422016.E().S(r.Ref) -//line templates/gitlist.qtpl:27 +//line templates/gitlist.qtpl:32 qw422016.N().S(`/">log</a> <a href="/`) -//line templates/gitlist.qtpl:28 +//line templates/gitlist.qtpl:33 qw422016.E().S(r.Name) -//line templates/gitlist.qtpl:28 +//line templates/gitlist.qtpl:33 qw422016.N().S(`/tree/`) -//line templates/gitlist.qtpl:28 +//line templates/gitlist.qtpl:33 qw422016.E().S(r.Ref) -//line templates/gitlist.qtpl:28 +//line templates/gitlist.qtpl:33 qw422016.N().S(`/">tree</a> <a href="/`) -//line templates/gitlist.qtpl:29 +//line templates/gitlist.qtpl:34 qw422016.E().S(r.Name) -//line templates/gitlist.qtpl:29 +//line templates/gitlist.qtpl:34 qw422016.N().S(`/refs/">refs</a> </p> </div> `) -//line templates/gitlist.qtpl:32 +//line templates/gitlist.qtpl:37 } -//line templates/gitlist.qtpl:32 +//line templates/gitlist.qtpl:37 qw422016.N().S(` </div> </div> <div id="about" class="col-md-4 order-first order-md-last"> `) -//line templates/gitlist.qtpl:36 +//line templates/gitlist.qtpl:41 qw422016.N().Z(p.About) -//line templates/gitlist.qtpl:36 +//line templates/gitlist.qtpl:41 qw422016.N().S(` <div class="alert alert-warning text-center" role="alert"> This project is under development, things may be broken or incomplete. @@ -170,65 +183,65 @@ func (p *GitListPage) StreamContent(qw422016 *qt422016.Writer, ctx context.Conte </div> </div> `) -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 } -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 func (p *GitListPage) WriteContent(qq422016 qtio422016.Writer, ctx context.Context) { -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 p.StreamContent(qw422016, ctx) -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 qt422016.ReleaseWriter(qw422016) -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 } -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 func (p *GitListPage) Content(ctx context.Context) string { -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 qb422016 := qt422016.AcquireByteBuffer() -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 p.WriteContent(qb422016, ctx) -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 qs422016 := string(qb422016.B) -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 qt422016.ReleaseByteBuffer(qb422016) -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 return qs422016 -//line templates/gitlist.qtpl:42 +//line templates/gitlist.qtpl:47 } -//line templates/gitlist.qtpl:44 +//line templates/gitlist.qtpl:49 func (p *GitListPage) StreamScript(qw422016 *qt422016.Writer, ctx context.Context) { -//line templates/gitlist.qtpl:44 +//line templates/gitlist.qtpl:49 qw422016.N().S(` `) -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 } -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 func (p *GitListPage) WriteScript(qq422016 qtio422016.Writer, ctx context.Context) { -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 p.StreamScript(qw422016, ctx) -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 qt422016.ReleaseWriter(qw422016) -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 } -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 func (p *GitListPage) Script(ctx context.Context) string { -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 qb422016 := qt422016.AcquireByteBuffer() -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 p.WriteScript(qb422016, ctx) -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 qs422016 := string(qb422016.B) -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 qt422016.ReleaseByteBuffer(qb422016) -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 return qs422016 -//line templates/gitlist.qtpl:45 +//line templates/gitlist.qtpl:50 } |