diff options
| author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-09 20:07:00 +0200 | 
|---|---|---|
| committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-09 20:07:00 +0200 | 
| commit | 2fcc394c53f995750b52ad06153041f61f0a0c55 (patch) | |
| tree | 6828a8e2520fdf27611efb33509f3cc745de68d4 /templates | |
| parent | 02614b3781f6acdfc6df0e7b07d856b2779c4ac7 (diff) | |
| download | cerrado-2fcc394c53f995750b52ad06153041f61f0a0c55.tar.gz cerrado-2fcc394c53f995750b52ad06153041f61f0a0c55.tar.bz2 cerrado-2fcc394c53f995750b52ad06153041f61f0a0c55.zip | |
feat: Add global reference to ref and name
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/gititem.qtpl | 4 | ||||
| -rw-r--r-- | templates/gititem.qtpl.go | 8 | ||||
| -rw-r--r-- | templates/gititemabout.qtpl | 2 | ||||
| -rw-r--r-- | templates/gititemabout.qtpl.go | 10 | ||||
| -rw-r--r-- | templates/gititemblob.qtpl | 2 | ||||
| -rw-r--r-- | templates/gititemblob.qtpl.go | 10 | ||||
| -rw-r--r-- | templates/gititemlog.qtpl | 2 | ||||
| -rw-r--r-- | templates/gititemlog.qtpl.go | 10 | ||||
| -rw-r--r-- | templates/gititemrefs.qtpl | 24 | ||||
| -rw-r--r-- | templates/gititemrefs.qtpl.go | 106 | ||||
| -rw-r--r-- | templates/gititemsummary.qtpl | 2 | ||||
| -rw-r--r-- | templates/gititemsummary.qtpl.go | 10 | ||||
| -rw-r--r-- | templates/gititemtree.qtpl | 8 | ||||
| -rw-r--r-- | templates/gititemtree.qtpl.go | 138 | 
14 files changed, 176 insertions, 160 deletions
| diff --git a/templates/gititem.qtpl b/templates/gititem.qtpl index d695782..a6a312d 100644 --- a/templates/gititem.qtpl +++ b/templates/gititem.qtpl @@ -1,7 +1,7 @@  {% interface   GitItemBase {     Nav(name, ref string) -   GitContent() +   GitContent(name, ref string)  }  %} @@ -20,7 +20,7 @@ type GitItemPage struct {  {% func (p *GitItemPage) Content() %}  {%= p.Nav(p.Name, p.Ref) %}  <div class="container"> -{%= p.GitContent() %} +{%= p.GitContent(p.Name, p.Ref) %}  </div>  {% endfunc %} diff --git a/templates/gititem.qtpl.go b/templates/gititem.qtpl.go index a7ed659..7cfeeb4 100644 --- a/templates/gititem.qtpl.go +++ b/templates/gititem.qtpl.go @@ -26,11 +26,11 @@ type GitItemBase interface {  //line gititem.qtpl:2  	WriteNav(qq422016 qtio422016.Writer, name, ref string)  //line gititem.qtpl:2 -	GitContent() string +	GitContent(name, ref string) string  //line gititem.qtpl:2 -	StreamGitContent(qw422016 *qt422016.Writer) +	StreamGitContent(qw422016 *qt422016.Writer, name, ref string)  //line gititem.qtpl:2 -	WriteGitContent(qq422016 qtio422016.Writer) +	WriteGitContent(qq422016 qtio422016.Writer, name, ref string)  //line gititem.qtpl:2  } @@ -121,7 +121,7 @@ func (p *GitItemPage) StreamContent(qw422016 *qt422016.Writer) {  <div class="container">  `)  //line gititem.qtpl:23 -	p.StreamGitContent(qw422016) +	p.StreamGitContent(qw422016, p.Name, p.Ref)  //line gititem.qtpl:23  	qw422016.N().S(`  </div> diff --git a/templates/gititemabout.qtpl b/templates/gititemabout.qtpl index e0fa9c3..abda2fb 100644 --- a/templates/gititemabout.qtpl +++ b/templates/gititemabout.qtpl @@ -5,6 +5,6 @@ type GitItemAboutPage struct {  {% func (g *GitItemAboutPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Readme) %}{% endfunc %} -{% func (g *GitItemAboutPage) GitContent() %} +{% func (g *GitItemAboutPage) GitContent(name, ref string) %}  <h4>About</h4>  {% endfunc %} diff --git a/templates/gititemabout.qtpl.go b/templates/gititemabout.qtpl.go index 0827fbe..cd49d2f 100644 --- a/templates/gititemabout.qtpl.go +++ b/templates/gititemabout.qtpl.go @@ -55,7 +55,7 @@ func (g *GitItemAboutPage) Nav(name, ref string) string {  }  //line gititemabout.qtpl:8 -func (g *GitItemAboutPage) StreamGitContent(qw422016 *qt422016.Writer) { +func (g *GitItemAboutPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {  //line gititemabout.qtpl:8  	qw422016.N().S(`  <h4>About</h4> @@ -64,22 +64,22 @@ func (g *GitItemAboutPage) StreamGitContent(qw422016 *qt422016.Writer) {  }  //line gititemabout.qtpl:10 -func (g *GitItemAboutPage) WriteGitContent(qq422016 qtio422016.Writer) { +func (g *GitItemAboutPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {  //line gititemabout.qtpl:10  	qw422016 := qt422016.AcquireWriter(qq422016)  //line gititemabout.qtpl:10 -	g.StreamGitContent(qw422016) +	g.StreamGitContent(qw422016, name, ref)  //line gititemabout.qtpl:10  	qt422016.ReleaseWriter(qw422016)  //line gititemabout.qtpl:10  }  //line gititemabout.qtpl:10 -func (g *GitItemAboutPage) GitContent() string { +func (g *GitItemAboutPage) GitContent(name, ref string) string {  //line gititemabout.qtpl:10  	qb422016 := qt422016.AcquireByteBuffer()  //line gititemabout.qtpl:10 -	g.WriteGitContent(qb422016) +	g.WriteGitContent(qb422016, name, ref)  //line gititemabout.qtpl:10  	qs422016 := string(qb422016.B)  //line gititemabout.qtpl:10 diff --git a/templates/gititemblob.qtpl b/templates/gititemblob.qtpl index 89d002d..f9bab3d 100644 --- a/templates/gititemblob.qtpl +++ b/templates/gititemblob.qtpl @@ -7,7 +7,7 @@ type GitItemBlobPage struct {  {% func (g *GitItemBlobPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Tree) %}{% endfunc %} -{% func (g *GitItemBlobPage) GitContent() %} +{% func (g *GitItemBlobPage) GitContent(name, ref string) %}  <div class="code-view">  {%z= g.Content %}  </div> diff --git a/templates/gititemblob.qtpl.go b/templates/gititemblob.qtpl.go index 6b4e187..05e0667 100644 --- a/templates/gititemblob.qtpl.go +++ b/templates/gititemblob.qtpl.go @@ -57,7 +57,7 @@ func (g *GitItemBlobPage) Nav(name, ref string) string {  }  //line gititemblob.qtpl:10 -func (g *GitItemBlobPage) StreamGitContent(qw422016 *qt422016.Writer) { +func (g *GitItemBlobPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {  //line gititemblob.qtpl:10  	qw422016.N().S(`  <div class="code-view"> @@ -72,22 +72,22 @@ func (g *GitItemBlobPage) StreamGitContent(qw422016 *qt422016.Writer) {  }  //line gititemblob.qtpl:14 -func (g *GitItemBlobPage) WriteGitContent(qq422016 qtio422016.Writer) { +func (g *GitItemBlobPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {  //line gititemblob.qtpl:14  	qw422016 := qt422016.AcquireWriter(qq422016)  //line gititemblob.qtpl:14 -	g.StreamGitContent(qw422016) +	g.StreamGitContent(qw422016, name, ref)  //line gititemblob.qtpl:14  	qt422016.ReleaseWriter(qw422016)  //line gititemblob.qtpl:14  }  //line gititemblob.qtpl:14 -func (g *GitItemBlobPage) GitContent() string { +func (g *GitItemBlobPage) GitContent(name, ref string) string {  //line gititemblob.qtpl:14  	qb422016 := qt422016.AcquireByteBuffer()  //line gititemblob.qtpl:14 -	g.WriteGitContent(qb422016) +	g.WriteGitContent(qb422016, name, ref)  //line gititemblob.qtpl:14  	qs422016 := string(qb422016.B)  //line gititemblob.qtpl:14 diff --git a/templates/gititemlog.qtpl b/templates/gititemlog.qtpl index ef473b7..1af05ca 100644 --- a/templates/gititemlog.qtpl +++ b/templates/gititemlog.qtpl @@ -8,7 +8,7 @@ type GitItemLogPage struct {  {% func (g *GitItemLogPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Log) %}{% endfunc %} -{% func (g *GitItemLogPage) GitContent() %} +{% func (g *GitItemLogPage) GitContent(name, ref string) %}  <div class="logs">    {% for _, c := range g.Commits %}    <div class="row"> diff --git a/templates/gititemlog.qtpl.go b/templates/gititemlog.qtpl.go index e3bac41..185b153 100644 --- a/templates/gititemlog.qtpl.go +++ b/templates/gititemlog.qtpl.go @@ -59,7 +59,7 @@ func (g *GitItemLogPage) Nav(name, ref string) string {  }  //line gititemlog.qtpl:11 -func (g *GitItemLogPage) StreamGitContent(qw422016 *qt422016.Writer) { +func (g *GitItemLogPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {  //line gititemlog.qtpl:11  	qw422016.N().S(`  <div class="logs"> @@ -106,22 +106,22 @@ func (g *GitItemLogPage) StreamGitContent(qw422016 *qt422016.Writer) {  }  //line gititemlog.qtpl:27 -func (g *GitItemLogPage) WriteGitContent(qq422016 qtio422016.Writer) { +func (g *GitItemLogPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {  //line gititemlog.qtpl:27  	qw422016 := qt422016.AcquireWriter(qq422016)  //line gititemlog.qtpl:27 -	g.StreamGitContent(qw422016) +	g.StreamGitContent(qw422016, name, ref)  //line gititemlog.qtpl:27  	qt422016.ReleaseWriter(qw422016)  //line gititemlog.qtpl:27  }  //line gititemlog.qtpl:27 -func (g *GitItemLogPage) GitContent() string { +func (g *GitItemLogPage) GitContent(name, ref string) string {  //line gititemlog.qtpl:27  	qb422016 := qt422016.AcquireByteBuffer()  //line gititemlog.qtpl:27 -	g.WriteGitContent(qb422016) +	g.WriteGitContent(qb422016, name, ref)  //line gititemlog.qtpl:27  	qs422016 := string(qb422016.B)  //line gititemlog.qtpl:27 diff --git a/templates/gititemrefs.qtpl b/templates/gititemrefs.qtpl index 56f6c2b..47a69e3 100644 --- a/templates/gititemrefs.qtpl +++ b/templates/gititemrefs.qtpl @@ -10,13 +10,12 @@ type GitItemRefsPage struct {  {% func (g *GitItemRefsPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Refs) %}{% endfunc %} -{% func (g *GitItemRefsPage) GitContent() %} +{% func (g *GitItemRefsPage) GitContent(name, ref string) %}  <div class="row"> -  <div class="col-xxl"> -    <h4>Tags</h4> -    <div class="logs"> +  <div class="col-md-8"> +    <div class="event-list">        {% for _, t := range g.Tags %} -      <div class="row"> +      <div class="row event">            <div class="col-xxl-2">             {%s TimeFormat(t.Tagger.When) %}            </div> @@ -30,14 +29,19 @@ type GitItemRefsPage struct {        {% endfor %}      </div>    </div> -  <div class="col-xxl"> -    <h4>Branches</h4> -    <div class="logs"> +  <div class="col-md-4"> +    <div class="event-list">        {% for _, b := range g.Branches %} -      <div class="row"> -          <div class="col-xxl"> +      <div class="row event"> +          <div class="col-4">             {%s b.Name().Short() %}            </div> +          <div class="col-8"> +            <div class="float-end"> +              <a href="/{%s name %}/tree/{%s b.Name().Short() %}">tree</a> +              <a href="/{%s name %}/log/{%s b.Name().Short() %}">log</a> +            </div> +          </div>        </div>        {% endfor %}      </div> diff --git a/templates/gititemrefs.qtpl.go b/templates/gititemrefs.qtpl.go index d2a362e..95dd31a 100644 --- a/templates/gititemrefs.qtpl.go +++ b/templates/gititemrefs.qtpl.go @@ -63,99 +63,119 @@ func (g *GitItemRefsPage) Nav(name, ref string) string {  }  //line gititemrefs.qtpl:13 -func (g *GitItemRefsPage) StreamGitContent(qw422016 *qt422016.Writer) { +func (g *GitItemRefsPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {  //line gititemrefs.qtpl:13  	qw422016.N().S(`  <div class="row"> -  <div class="col-xxl"> -    <h4>Tags</h4> -    <div class="logs"> +  <div class="col-md-8"> +    <div class="event-list">        `) -//line gititemrefs.qtpl:18 +//line gititemrefs.qtpl:17  	for _, t := range g.Tags { -//line gititemrefs.qtpl:18 +//line gititemrefs.qtpl:17  		qw422016.N().S(` -      <div class="row"> +      <div class="row event">            <div class="col-xxl-2">             `) -//line gititemrefs.qtpl:21 +//line gititemrefs.qtpl:20  		qw422016.E().S(TimeFormat(t.Tagger.When)) -//line gititemrefs.qtpl:21 +//line gititemrefs.qtpl:20  		qw422016.N().S(`            </div>            <div class="col-xxl-7">             <pre>`) -//line gititemrefs.qtpl:24 +//line gititemrefs.qtpl:23  		qw422016.E().S(t.Message) -//line gititemrefs.qtpl:24 +//line gititemrefs.qtpl:23  		qw422016.N().S(`</pre>            </div>            <div class="col-xxl-3">             <small>`) -//line gititemrefs.qtpl:27 +//line gititemrefs.qtpl:26  		qw422016.E().S(t.Tagger.Name) -//line gititemrefs.qtpl:27 +//line gititemrefs.qtpl:26  		qw422016.N().S(`</small>            </div>        </div>        `) -//line gititemrefs.qtpl:30 +//line gititemrefs.qtpl:29  	} -//line gititemrefs.qtpl:30 +//line gititemrefs.qtpl:29  	qw422016.N().S(`      </div>    </div> -  <div class="col-xxl"> -    <h4>Branches</h4> -    <div class="logs"> +  <div class="col-md-4"> +    <div class="event-list">        `) -//line gititemrefs.qtpl:36 +//line gititemrefs.qtpl:34  	for _, b := range g.Branches { -//line gititemrefs.qtpl:36 +//line gititemrefs.qtpl:34  		qw422016.N().S(` -      <div class="row"> -          <div class="col-xxl"> +      <div class="row event"> +          <div class="col-4">             `) -//line gititemrefs.qtpl:39 +//line gititemrefs.qtpl:37  		qw422016.E().S(b.Name().Short()) -//line gititemrefs.qtpl:39 +//line gititemrefs.qtpl:37  		qw422016.N().S(`            </div> +          <div class="col-8"> +            <div class="float-end"> +              <a href="/`) +//line gititemrefs.qtpl:41 +		qw422016.E().S(name) +//line gititemrefs.qtpl:41 +		qw422016.N().S(`/tree/`) +//line gititemrefs.qtpl:41 +		qw422016.E().S(b.Name().Short()) +//line gititemrefs.qtpl:41 +		qw422016.N().S(`">tree</a> +              <a href="/`) +//line gititemrefs.qtpl:42 +		qw422016.E().S(name) +//line gititemrefs.qtpl:42 +		qw422016.N().S(`/log/`) +//line gititemrefs.qtpl:42 +		qw422016.E().S(b.Name().Short()) +//line gititemrefs.qtpl:42 +		qw422016.N().S(`">log</a> +            </div> +          </div>        </div>        `) -//line gititemrefs.qtpl:42 +//line gititemrefs.qtpl:46  	} -//line gititemrefs.qtpl:42 +//line gititemrefs.qtpl:46  	qw422016.N().S(`      </div>    </div>  </div>  `) -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50  } -//line gititemrefs.qtpl:46 -func (g *GitItemRefsPage) WriteGitContent(qq422016 qtio422016.Writer) { -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50 +func (g *GitItemRefsPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) { +//line gititemrefs.qtpl:50  	qw422016 := qt422016.AcquireWriter(qq422016) -//line gititemrefs.qtpl:46 -	g.StreamGitContent(qw422016) -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50 +	g.StreamGitContent(qw422016, name, ref) +//line gititemrefs.qtpl:50  	qt422016.ReleaseWriter(qw422016) -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50  } -//line gititemrefs.qtpl:46 -func (g *GitItemRefsPage) GitContent() string { -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50 +func (g *GitItemRefsPage) GitContent(name, ref string) string { +//line gititemrefs.qtpl:50  	qb422016 := qt422016.AcquireByteBuffer() -//line gititemrefs.qtpl:46 -	g.WriteGitContent(qb422016) -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50 +	g.WriteGitContent(qb422016, name, ref) +//line gititemrefs.qtpl:50  	qs422016 := string(qb422016.B) -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50  	qt422016.ReleaseByteBuffer(qb422016) -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50  	return qs422016 -//line gititemrefs.qtpl:46 +//line gititemrefs.qtpl:50  } diff --git a/templates/gititemsummary.qtpl b/templates/gititemsummary.qtpl index 5756ea5..4cbf324 100644 --- a/templates/gititemsummary.qtpl +++ b/templates/gititemsummary.qtpl @@ -5,6 +5,6 @@ type GitItemSummaryPage struct {  {% func (g *GitItemSummaryPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Summary) %}{% endfunc %} -{% func (g *GitItemSummaryPage) GitContent() %} +{% func (g *GitItemSummaryPage) GitContent(name, ref string) %}  <h4>Summary</h4>  {% endfunc %} diff --git a/templates/gititemsummary.qtpl.go b/templates/gititemsummary.qtpl.go index 99cb984..d8606a5 100644 --- a/templates/gititemsummary.qtpl.go +++ b/templates/gititemsummary.qtpl.go @@ -55,7 +55,7 @@ func (g *GitItemSummaryPage) Nav(name, ref string) string {  }  //line gititemsummary.qtpl:8 -func (g *GitItemSummaryPage) StreamGitContent(qw422016 *qt422016.Writer) { +func (g *GitItemSummaryPage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) {  //line gititemsummary.qtpl:8  	qw422016.N().S(`  <h4>Summary</h4> @@ -64,22 +64,22 @@ func (g *GitItemSummaryPage) StreamGitContent(qw422016 *qt422016.Writer) {  }  //line gititemsummary.qtpl:10 -func (g *GitItemSummaryPage) WriteGitContent(qq422016 qtio422016.Writer) { +func (g *GitItemSummaryPage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) {  //line gititemsummary.qtpl:10  	qw422016 := qt422016.AcquireWriter(qq422016)  //line gititemsummary.qtpl:10 -	g.StreamGitContent(qw422016) +	g.StreamGitContent(qw422016, name, ref)  //line gititemsummary.qtpl:10  	qt422016.ReleaseWriter(qw422016)  //line gititemsummary.qtpl:10  }  //line gititemsummary.qtpl:10 -func (g *GitItemSummaryPage) GitContent() string { +func (g *GitItemSummaryPage) GitContent(name, ref string) string {  //line gititemsummary.qtpl:10  	qb422016 := qt422016.AcquireByteBuffer()  //line gititemsummary.qtpl:10 -	g.WriteGitContent(qb422016) +	g.WriteGitContent(qb422016, name, ref)  //line gititemsummary.qtpl:10  	qs422016 := string(qb422016.B)  //line gititemsummary.qtpl:10 diff --git a/templates/gititemtree.qtpl b/templates/gititemtree.qtpl index 68b9856..ffc063d 100644 --- a/templates/gititemtree.qtpl +++ b/templates/gititemtree.qtpl @@ -4,23 +4,19 @@  type GitItemTreePage struct {      CurrentPath string      Tree *object.Tree - -    // TODO: remove this since it can be passed by GitCommit -    Ref string -    Name string  }  %}  {% func (g *GitItemTreePage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Tree) %}{% endfunc %} -{% func (g *GitItemTreePage) GitContent() %} +{% func (g *GitItemTreePage) GitContent(name, ref string) %}  <div class="row">    <div class="col-md-12">      <div class="tree-list">        {% for _, e := range g.Tree.Entries %}            <div class="mode">{%s Ignore(e.Mode.ToOSFileMode()).String() %}</div>            {% if e.Mode.IsFile() %} -          <div class="name blob"><a href="/{%s g.Name %}/blob/{%s g.Ref%}/{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div> +          <div class="name blob"><a href="/{%s name %}/blob/{%s ref%}/{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div>            {% else %}            <div class="name tree"><a href="./{%s g.CurrentPath %}/{%s e.Name %}">{%s e.Name %}</a></div>            {% endif %} diff --git a/templates/gititemtree.qtpl.go b/templates/gititemtree.qtpl.go index 546cb13..0e9b09e 100644 --- a/templates/gititemtree.qtpl.go +++ b/templates/gititemtree.qtpl.go @@ -24,152 +24,148 @@ var (  type GitItemTreePage struct {  	CurrentPath string  	Tree        *object.Tree - -	// TODO: remove this since it can be passed by GitCommit -	Ref  string -	Name string  } -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  func (g *GitItemTreePage) StreamNav(qw422016 *qt422016.Writer, name, ref string) { -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	StreamGitItemNav(qw422016, name, ref, Tree) -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  } -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  func (g *GitItemTreePage) WriteNav(qq422016 qtio422016.Writer, name, ref string) { -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	qw422016 := qt422016.AcquireWriter(qq422016) -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	g.StreamNav(qw422016, name, ref) -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	qt422016.ReleaseWriter(qw422016) -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  } -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  func (g *GitItemTreePage) Nav(name, ref string) string { -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	qb422016 := qt422016.AcquireByteBuffer() -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	g.WriteNav(qb422016, name, ref) -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	qs422016 := string(qb422016.B) -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	qt422016.ReleaseByteBuffer(qb422016) -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  	return qs422016 -//line gititemtree.qtpl:14 +//line gititemtree.qtpl:10  } -//line gititemtree.qtpl:16 -func (g *GitItemTreePage) StreamGitContent(qw422016 *qt422016.Writer) { -//line gititemtree.qtpl:16 +//line gititemtree.qtpl:12 +func (g *GitItemTreePage) StreamGitContent(qw422016 *qt422016.Writer, name, ref string) { +//line gititemtree.qtpl:12  	qw422016.N().S(`  <div class="row">    <div class="col-md-12">      <div class="tree-list">        `) -//line gititemtree.qtpl:20 +//line gititemtree.qtpl:16  	for _, e := range g.Tree.Entries { -//line gititemtree.qtpl:20 +//line gititemtree.qtpl:16  		qw422016.N().S(`            <div class="mode">`) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:17  		qw422016.E().S(Ignore(e.Mode.ToOSFileMode()).String()) -//line gititemtree.qtpl:21 +//line gititemtree.qtpl:17  		qw422016.N().S(`</div>            `) -//line gititemtree.qtpl:22 +//line gititemtree.qtpl:18  		if e.Mode.IsFile() { -//line gititemtree.qtpl:22 +//line gititemtree.qtpl:18  			qw422016.N().S(`            <div class="name blob"><a href="/`) -//line gititemtree.qtpl:23 -			qw422016.E().S(g.Name) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19 +			qw422016.E().S(name) +//line gititemtree.qtpl:19  			qw422016.N().S(`/blob/`) -//line gititemtree.qtpl:23 -			qw422016.E().S(g.Ref) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19 +			qw422016.E().S(ref) +//line gititemtree.qtpl:19  			qw422016.N().S(`/`) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19  			qw422016.E().S(g.CurrentPath) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19  			qw422016.N().S(`/`) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19  			qw422016.E().S(e.Name) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19  			qw422016.N().S(`">`) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19  			qw422016.E().S(e.Name) -//line gititemtree.qtpl:23 +//line gititemtree.qtpl:19  			qw422016.N().S(`</a></div>            `) -//line gititemtree.qtpl:24 +//line gititemtree.qtpl:20  		} else { -//line gititemtree.qtpl:24 +//line gititemtree.qtpl:20  			qw422016.N().S(`            <div class="name tree"><a href="./`) -//line gititemtree.qtpl:25 +//line gititemtree.qtpl:21  			qw422016.E().S(g.CurrentPath) -//line gititemtree.qtpl:25 +//line gititemtree.qtpl:21  			qw422016.N().S(`/`) -//line gititemtree.qtpl:25 +//line gititemtree.qtpl:21  			qw422016.E().S(e.Name) -//line gititemtree.qtpl:25 +//line gititemtree.qtpl:21  			qw422016.N().S(`">`) -//line gititemtree.qtpl:25 +//line gititemtree.qtpl:21  			qw422016.E().S(e.Name) -//line gititemtree.qtpl:25 +//line gititemtree.qtpl:21  			qw422016.N().S(`</a></div>            `) -//line gititemtree.qtpl:26 +//line gititemtree.qtpl:22  		} -//line gititemtree.qtpl:26 +//line gititemtree.qtpl:22  		qw422016.N().S(`            <div class="commit"></div>            <div class="date"></div>            <div class="size">`) -//line gititemtree.qtpl:29 +//line gititemtree.qtpl:25  		qw422016.N().DL(Ignore(g.Tree.Size(e.Name))) -//line gititemtree.qtpl:29 +//line gititemtree.qtpl:25  		qw422016.N().S(` KiB</div>        `) -//line gititemtree.qtpl:30 +//line gititemtree.qtpl:26  	} -//line gititemtree.qtpl:30 +//line gititemtree.qtpl:26  	qw422016.N().S(`      </div>    </div>  </div>  `) -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30  } -//line gititemtree.qtpl:34 -func (g *GitItemTreePage) WriteGitContent(qq422016 qtio422016.Writer) { -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30 +func (g *GitItemTreePage) WriteGitContent(qq422016 qtio422016.Writer, name, ref string) { +//line gititemtree.qtpl:30  	qw422016 := qt422016.AcquireWriter(qq422016) -//line gititemtree.qtpl:34 -	g.StreamGitContent(qw422016) -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30 +	g.StreamGitContent(qw422016, name, ref) +//line gititemtree.qtpl:30  	qt422016.ReleaseWriter(qw422016) -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30  } -//line gititemtree.qtpl:34 -func (g *GitItemTreePage) GitContent() string { -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30 +func (g *GitItemTreePage) GitContent(name, ref string) string { +//line gititemtree.qtpl:30  	qb422016 := qt422016.AcquireByteBuffer() -//line gititemtree.qtpl:34 -	g.WriteGitContent(qb422016) -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30 +	g.WriteGitContent(qb422016, name, ref) +//line gititemtree.qtpl:30  	qs422016 := string(qb422016.B) -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30  	qt422016.ReleaseByteBuffer(qb422016) -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30  	return qs422016 -//line gititemtree.qtpl:34 +//line gititemtree.qtpl:30  } | 
