diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-12 20:35:35 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-12 20:35:35 -0400 |
commit | 90f6aa8cd19e489723ddffc40d6507782c29756c (patch) | |
tree | e247229573a4d32ca1d508619951a9868690840f /templates | |
parent | 23bba7633bbd8ae8f9f41404352c327f9e8c9fdc (diff) | |
download | gitea-90f6aa8cd19e489723ddffc40d6507782c29756c.tar.gz gitea-90f6aa8cd19e489723ddffc40d6507782c29756c.zip |
Add repo mirror and import
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/navbar.tmpl | 2 | ||||
-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 | ||||
-rw-r--r-- | templates/user/dashboard.tmpl | 2 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 24 |
8 files changed, 49 insertions, 43 deletions
diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl index 708a397680..cd3f2b83a9 100644 --- a/templates/base/navbar.tmpl +++ b/templates/base/navbar.tmpl @@ -28,7 +28,7 @@ <div class="dropdown-menu"> <ul class="list-unstyled"> <li><a href="/repo/create"><i class="fa fa-book"></i>Repository</a></li> - <li><a href="/repo/mirror"><i class="fa fa-clipboard"></i>Mirror</a></li> + <li><a href="/repo/migrate"><i class="fa fa-clipboard"></i>Migration</a></li> <!-- <li><a href="#"><i class="fa fa-users"></i>Organization</a></li> --> </ul> </div> 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"> diff --git a/templates/user/dashboard.tmpl b/templates/user/dashboard.tmpl index efa78d8807..167ae9abbd 100644 --- a/templates/user/dashboard.tmpl +++ b/templates/user/dashboard.tmpl @@ -34,7 +34,7 @@ <div class="dropdown-menu dropdown-menu-right"> <ul class="list-unstyled"> <li><a href="/repo/create"><i class="fa fa-book"></i>Repository</a></li> - <li><a href="/repo/mirror"><i class="fa fa-clipboard"></i>Mirror</a></li> + <li><a href="/repo/migrate"><i class="fa fa-clipboard"></i>Migration</a></li> <!-- <li><a href="#"><i class="fa fa-users"></i>Organization</a></li> --> </ul> </div> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 0cbd348910..255eb71cb2 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -10,7 +10,18 @@ </div> <div class="profile-info"> <ul class="list-group"> - <li class="list-group-item"> + {{if .Owner.Location}} + <li class="list-group-item"><i class="fa fa-thumb-tack"></i>{{.Owner.Location}}</li> + {{end}} + {{if .Owner.Email}} + <li class="list-group-item"><i class="fa fa-envelope"></i><a href="mailto:{{.Owner.Email}}">{{.Owner.Email}}</a></li> + {{end}} + {{if .Owner.Website}} + <li class="list-group-item"><i class="fa fa-link"></i><a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a></li> + {{end}} + <li class="list-group-item"><i class="fa fa-clock-o"></i>Joined on {{DateFormat .Owner.Created "M d, Y"}}</li> + <hr> + <li class="list-group-item" style="padding-top: 5px;"> <div class="profile-rel"> <div class="col-md-6 followers"> <strong>123</strong> @@ -22,16 +33,7 @@ </div> </div> </li> - {{if .Owner.Location}} - <li class="list-group-item"><i class="fa fa-thumb-tack"></i>{{.Owner.Location}}</li> - {{end}} - {{if .Owner.Email}} - <li class="list-group-item"><i class="fa fa-envelope"></i><a href="mailto:{{.Owner.Email}}">{{.Owner.Email}}</a></li> - {{end}} - {{if .Owner.Website}} - <li class="list-group-item"><i class="fa fa-link"></i><a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a></li> - {{end}} - <li class="list-group-item"><i class="fa fa-clock-o"></i>Joined on {{DateFormat .Owner.Created "M d, Y"}}</li> + <hr> </ul> </div> </div> |