request.element.tpl.html

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{{if ne .Issue.PatchRef ""}}

<article class="issueelement">
  <header>{{.Issue.User}}  submitted a <a href="/repos/{{.Repo}}/patch/{{.Issue.ID}}/{{.Issue.PatchRef}}">patch request</a> {{.Issue.Created.Format "Jan 02, 2006 15:04" }} 




  </header>
  <ul>
      <li><strong>Title:</strong> {{.Issue.PatchInfo.Title}}</li>
      <li><strong>Author:</strong> {{.Issue.PatchInfo.Author}}</li>
    </ul>
        
     {{.Issue.PatchInfo.Body}}
       



</article>


{{else if eq .Issue.RequestType 0}}

<article class="issueelement">
  <header>{{.Issue.User}} commented {{.Issue.Created.Format "Jan 02, 2006 15:04" }} 

  </header>
      <p>{{.Issue.Description}}</p>



</article>

{{else}}


<article class="issueelement">
  <header>{{.Issue.User}} replied {{.Issue.Created.Format "Jan 02, 2006 15:04" }}

        
    {{if eq .Issue.Moderated true}}
     <mark>Pending</mark>
    {{end}}
  </header>
      <p>{{.Issue.Description}}</p>


      {{if eq .User.IsMaintainer true}} 
      <footer>
       <div role="group">

         
         <form class="shrink" method="post" action="/repos/{{.Repo}}/requests/approve">
            <input hidden name="requestid" value="{{.Request}}" />
            <input hidden name="elementid" value="{{.Issue.ID}}" />
            <button data-tooltip="Approve Comment">✓</button>
          </form>

          <form  class="shrink" method="post" action="/repos/{{.Repo}}/requests/tombstone">
            <input hidden name="requestid" value="{{.Request}}" />
            <input hidden name="elementid" value="{{.Issue.ID}}" />
            <button data-tooltip="Delete Comment">🗑</button>
          </form>
        </div>
      </footer>
      {{end}}

</article>


{{end}}