Преглед изворни кода

[GinR] reintroduce archive download

cgars пре 7 година
родитељ
комит
9a9ed14b8f
1 измењених фајлова са 25 додато и 0 уклоњено
  1. 25 0
      templates/repo/home.tmpl

+ 25 - 0
templates/repo/home.tmpl

@@ -88,6 +88,31 @@
 						<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
 							<i class="octicon octicon-clippy"></i>
 						</button>
+						<div id="download-repo-button" class="ui basic jump dropdown icon button">
+						<i class="download icon"></i>
+						</div>
+
+						<!-- Download moddal -->
+						<div id="download_modal" class="ui modal warning">
+							<i class="close icon"></i>
+							<div class="content">
+								<div class="ui header">So you want to download data without tooling (eg. git, git-annex or GIN)?</div>
+								<p>Here is what you can do:</p>
+								<p>Download the small files and the file structure as an archive (zip or tar). The big files will be
+									included namewise but the data will not be there. To get the content of the big files
+									you need to download them individually from the web interface. This way you can get the file structure but the heavy load only on demand!</p>
+								<p>Download the small files as GIN archive(*.gin.zip). This is comparable to the situation above, however
+									you also get the history and the possibility
+									to request the big  files via git-annex or GIN-client.</p>
+							</div>
+							<div class="actions">
+								<a class="ui positive button" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="octicon octicon-file-zip"></i> Download zip</a>
+								<a class="ui positive button" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i> Download tar.gz</a>
+								<a class="ui positive button" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.gin.zip"><i
+									class="octicon octicon-file-zip"></i> Download GIN archive</a>
+								</div>
+							</div>
+
 					</div>
 				{{end}}
 			</div>