]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dashboard/codereview: add admin-only link to force-update a CL.
authorDavid Symonds <dsymonds@golang.org>
Mon, 23 Jul 2012 02:41:23 +0000 (12:41 +1000)
committerDavid Symonds <dsymonds@golang.org>
Mon, 23 Jul 2012 02:41:23 +0000 (12:41 +1000)
R=nigeltao
CC=golang-dev
https://golang.org/cl/6431055

misc/dashboard/codereview/dashboard/front.go

index 21d4d3cda95958ccdb392494f91bfae91a843a16..791a1000c23586daae35adb5e3dce6ff59fe1a69 100644 (file)
@@ -30,6 +30,7 @@ func handleFront(w http.ResponseWriter, r *http.Request) {
        data := &frontPageData{
                Reviewers: personList,
                User:      user.Current(c).Email,
+               IsAdmin:   user.IsAdmin(c),
        }
        var currentPerson string
        currentPerson, data.UserIsReviewer = emailToPerson[data.User]
@@ -136,6 +137,7 @@ type frontPageData struct {
        UserIsReviewer bool
 
        User, LogoutURL string
+       IsAdmin         bool
 }
 
 type clTable struct {
@@ -245,6 +247,7 @@ var frontPage = template.Must(template.New("front").Funcs(template.FuncMap{
       {{if and .LGTMs $tbl.Assignable}}<br /><span style="font-size: smaller;">LGTMs: {{.LGTMHTML}}{{end}}</span>
     </td>
     <td title="Last modified">{{.ModifiedAgo}}</td>
+    {{if $.IsAdmin}}<td><a href="/update-cl?cl={{.Number}}" title="Update this CL">&#x27f3;</a></td>{{end}}
   </tr>
 {{end}}
 </table>