mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add repo mirror and import
This commit is contained in:
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
@@ -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">
|
||||
|
@@ -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">
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user