Commit a8ce9ab4 authored by David Symonds's avatar David Symonds

misc/dashboard/codereview: add admin-only link to force-update a CL.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6431055
parent f979528c
...@@ -30,6 +30,7 @@ func handleFront(w http.ResponseWriter, r *http.Request) { ...@@ -30,6 +30,7 @@ func handleFront(w http.ResponseWriter, r *http.Request) {
data := &frontPageData{ data := &frontPageData{
Reviewers: personList, Reviewers: personList,
User: user.Current(c).Email, User: user.Current(c).Email,
IsAdmin: user.IsAdmin(c),
} }
var currentPerson string var currentPerson string
currentPerson, data.UserIsReviewer = emailToPerson[data.User] currentPerson, data.UserIsReviewer = emailToPerson[data.User]
...@@ -136,6 +137,7 @@ type frontPageData struct { ...@@ -136,6 +137,7 @@ type frontPageData struct {
UserIsReviewer bool UserIsReviewer bool
User, LogoutURL string User, LogoutURL string
IsAdmin bool
} }
type clTable struct { type clTable struct {
...@@ -245,6 +247,7 @@ var frontPage = template.Must(template.New("front").Funcs(template.FuncMap{ ...@@ -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> {{if and .LGTMs $tbl.Assignable}}<br /><span style="font-size: smaller;">LGTMs: {{.LGTMHTML}}{{end}}</span>
</td> </td>
<td title="Last modified">{{.ModifiedAgo}}</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> </tr>
{{end}} {{end}}
</table> </table>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment