diff options
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/commits.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/migrate.tmpl (renamed from templates/repo/mirror.tmpl) | 44 | ||||
-rw-r--r-- | templates/repo/nav.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/single_bare.tmpl | 14 |
5 files changed, 34 insertions, 30 deletions
diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index 68b1403589..8125fedaa8 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -31,7 +31,7 @@ {{$r := List .Commits}} {{range $r}} <tr> - <td class="author"><img class="avatar" src="{{AvatarLink .Author.Email}}" alt=""/><a href="/user/{{.Author.Name}}">{{.Author.Name}}</a></td> + <td class="author"><img class="avatar" src="{{AvatarLink .Author.Email}}" alt=""/><a href="/user/email2user?email={{.Author.Email}}">{{.Author.Name}}</a></td> <td class="sha"><a class="label label-success" href="/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> <td class="message">{{.Message}} </td> <td class="date">{{TimeSince .Author.When}}</td> diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index 796a8e94c3..f3d935aebe 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -14,7 +14,7 @@ </span> <p class="author"> <img class="avatar" src="{{AvatarLink .Commit.Author.Email}}" alt=""/> - <a class="name" href="#"><strong>{{.Commit.Author.Name}}</strong></a> + <a class="name" href="/user/email2user?email={{.Commit.Author.Email}}"><strong>{{.Commit.Author.Name}}</strong></a> <span class="time">{{TimeSince .Commit.Author.When}}</span> </p> </div> diff --git a/templates/repo/mirror.tmpl b/templates/repo/migrate.tmpl index 0f10d1f549..34a4077eec 100644 --- a/templates/repo/mirror.tmpl +++ b/templates/repo/migrate.tmpl @@ -1,24 +1,26 @@ {{template "base/head" .}} {{template "base/navbar" .}} <div class="container" id="body"> - <form action="/repo/create" method="post" class="form-horizontal card" id="repo-create"> + <form action="/repo/migrate" method="post" class="form-horizontal card" id="repo-create"> {{.CsrfTokenHtml}} - <h3>Create Repository Mirror</h3> + <h3>Repository Migration</h3> {{template "base/alert" .}} - <div class="form-group"> + <!-- <div class="form-group"> <label class="col-md-2 control-label">From<strong class="text-danger">*</strong></label> <div class="col-md-8"> <select class="form-control" name="from"> - <option value="">GitHub</option> + <option value="github">GitHub</option> </select> </div> - </div> + </div> --> + <div class="form-group"> - <label class="col-md-2 control-label">URL<strong class="text-danger">*</strong></label> + <label class="col-md-2 control-label">HTTPS URL<strong class="text-danger">*</strong></label> <div class="col-md-8"> - <input name="url" type="text" class="form-control" placeholder="Type your mirror repository url link" required="required"> + <input name="url" type="text" class="form-control" placeholder="Type your migration repository HTTPS URL" value="{{.url}}" required="required" > </div> </div> + <div class="form-group"> <div class="col-md-offset-2 col-md-8"> <a class="btn btn-default" data-toggle="collapse" data-target="#repo-import-auth">Need Authorization</a> @@ -27,13 +29,13 @@ <div class="form-group"> <label class="col-md-2 control-label">Username</label> <div class="col-md-8"> - <input name="auth-username" type="text" class="form-control"> + <input name="auth_username" type="text" class="form-control" placeholder="Type your user name" value="{{.auth_username}}" > </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Password</label> <div class="col-md-8"> - <input name="auth-password" type="text" class="form-control"> + <input name="auth_password" type="password" class="form-control" placeholder="Type your password" value="{{.auth_password}}" > </div> </div> </div> @@ -56,10 +58,26 @@ </div> <div class="form-group"> - <label class="col-md-2 control-label">Visibility<strong class="text-danger">*</strong></label> + <label class="col-md-2 control-label">Migration Type</label> <div class="col-md-8"> - <p class="form-control-static">Public</p> - <input type="hidden" value="public" name="visibility"/> + <div class="checkbox"> + <label> + <input type="checkbox" name="mirror" {{if .mirror}}checked{{end}}> + <strong>This repository is a mirror</strong> + </label> + </div> + </div> + </div> + + <div class="form-group"> + <label class="col-md-2 control-label">Visibility</label> + <div class="col-md-8"> + <div class="checkbox"> + <label> + <input type="checkbox" name="private" {{if .private}}checked{{end}}> + <strong>This repository is private</strong> + </label> + </div> </div> </div> @@ -72,7 +90,7 @@ <div class="form-group"> <div class="col-md-offset-2 col-md-8"> - <button type="submit" class="btn btn-lg btn-primary">Mirror repository</button> + <button type="submit" class="btn btn-lg btn-primary">Migrate repository</button> <a href="/" class="text-danger">Cancel</a> </div> </div> diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl index f365ab6493..f9f74dd194 100644 --- a/templates/repo/nav.tmpl +++ b/templates/repo/nav.tmpl @@ -2,7 +2,7 @@ <div class="container"> <div class="row"> <div class="col-md-7"> - <h3 class="name"><i class="fa fa-book fa-lg"></i><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="/{{.Owner.Name}}/{{.Repository.Name}}">{{.Repository.Name}}</a>{{if .Repository.IsPrivate}} <span class="label label-default">Private</span> {{end}}</h3> + <h3 class="name"><i class="fa fa-book fa-lg"></i><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="/{{.Owner.Name}}/{{.Repository.Name}}">{{.Repository.Name}}</a> {{if .Repository.IsPrivate}}<span class="label label-default">Private</span>{{else if .Repository.IsMirror}}<span class="label label-default">Mirror</span>{{end}}</h3> <p class="desc">{{.Repository.Description}}{{if .Repository.Website}} <a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}</p> </div> <div class="col-md-5 actions text-right clone-group-btn"> diff --git a/templates/repo/single_bare.tmpl b/templates/repo/single_bare.tmpl index 7d7016e5c5..fc0a3bd96c 100644 --- a/templates/repo/single_bare.tmpl +++ b/templates/repo/single_bare.tmpl @@ -9,20 +9,6 @@ <h4>Quick Guide</h4> </div> <div class="panel-body guide-content text-center"> - <form action="{{.RepoLink}}/import" method="post"> - {{.CsrfTokenHtml}} - <h3>Clone from existing repository</h3> - <div class="input-group col-md-6 col-md-offset-3"> - <span class="input-group-btn"> - <button class="btn btn-default" type="button">URL</button> - </span> - <input name="import_url" class="form-control" placeholder="Type existing repository address" required="required"> - <span class="input-group-btn"> - <button type="submit" class="btn btn-default" type="button">Clone</button> - </span> - </div> - </form> - <h3>Clone this repository</h3> <div class="input-group col-md-8 col-md-offset-2 guide-buttons"> <span class="input-group-btn"> |