From 1755aa6e39eb6132a5d6f36791e45df4fb17d10d Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 4 Jan 2021 09:58:18 +0800 Subject: [PATCH 1/7] delete task.. --- templates/repo/cloudbrain/index.tmpl | 421 +++++++++++---------------- test.txt | 0 2 files changed, 178 insertions(+), 243 deletions(-) create mode 100644 test.txt diff --git a/templates/repo/cloudbrain/index.tmpl b/templates/repo/cloudbrain/index.tmpl index 5361db7dd..d8fb0df05 100755 --- a/templates/repo/cloudbrain/index.tmpl +++ b/templates/repo/cloudbrain/index.tmpl @@ -1,137 +1,192 @@ + {{template "base/head" .}} - -
-
-
-
-
-
-
-
-
- - -
-
{{template "repo/header" .}} -
-
-
-

{{.i18n.Tr "repo.cloudbrain"}}

-
-
-
-
- {{if .Permission.CanWrite $.UnitTypeCloudBrain}} - {{.i18n.Tr "repo.cloudbrain.new"}} {{end}} -
+ + +
+ + + -
-
-
-
-
-
-
-
-
- -
+ + +
+
+ +
+ + +
+
+

{{.i18n.Tr "repo.cloudbrain"}}

+
+ +
+
+ +
+ {{if .Permission.CanWrite $.UnitTypeCloudBrain}} + {{.i18n.Tr "repo.cloudbrain.new"}} {{end}}
-
- {{range .Tasks}} -
-
- -
- {{.Status}} -
-
- {{svg "octicon-flame" 16}} {{TimeSinceUnix .CreatedUnix $.Lang}} -
-
- - - 查看 - - -
-
- - - 调试 - - -
-
- -
- {{$.CsrfTokenHtml}} - 停止 -
-
+ + +
+ + +
+
+
+ + +
+
+
+
+
+ +
+
- - - - - 提交镜像 - -
+
+ + +
{{template "base/footer" .}} + +
@@ -114,7 +289,8 @@
{{$.CsrfTokenHtml}} - 删除 + + 删除
@@ -138,12 +314,11 @@
- - 提交镜像 + 提交镜像 - + +
+
+ +
+ +
{{template "base/footer" .}} - - - \ No newline at end of file + \ No newline at end of file From 1d5fe71827672a47bb9e75152a5e21622ef25c54 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 4 Jan 2021 20:49:26 +0800 Subject: [PATCH 6/7] complate delete function. --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29bb..000000000 From 633b65c10eae633125c99be74cab6a6bace2a110 Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 4 Jan 2021 21:18:57 +0800 Subject: [PATCH 7/7] add delete message. --- templates/repo/cloudbrain/index.tmpl | 274 ++++++++++++--------------- 1 file changed, 125 insertions(+), 149 deletions(-) diff --git a/templates/repo/cloudbrain/index.tmpl b/templates/repo/cloudbrain/index.tmpl index 418c6ff74..18c5053e2 100755 --- a/templates/repo/cloudbrain/index.tmpl +++ b/templates/repo/cloudbrain/index.tmpl @@ -169,10 +169,6 @@ .dis { margin-bottom: 20px; } - - .repository .ui.tabs.divider { - margin-bottom: 0px !important; - } @@ -191,206 +187,187 @@
{{template "repo/header" .}} + +
- -
+ +
+
+

{{.i18n.Tr "repo.cloudbrain"}}

+
- - - -
-
- -
- - -
-
-

{{.i18n.Tr "repo.cloudbrain"}}

-
- -
-
+ +
-
- {{if .Permission.CanWrite $.UnitTypeCloudBrain}} - {{.i18n.Tr "repo.cloudbrain.new"}} {{end}} -
-
+ +
+
+
- -
- - -
-
-
- - -
-
-
-
-
- +
+
- -
- {{range .Tasks}} -
-
- - - + +
+ {{range .Tasks}} +
+
+ + + - -
- {{.Status}} -
+ +
+ {{.Status}} +
- -
- {{svg "octicon-flame" 16}} {{TimeSinceUnix .CreatedUnix $.Lang}} -
+ +
+ {{svg "octicon-flame" 16}} {{TimeSinceUnix .CreatedUnix $.Lang}} +
- -
- + + + + +
- -
- + +
+
{{$.CsrfTokenHtml}} 删除
-
+
- -
- + + + + +
- -
- + +
+
{{$.CsrfTokenHtml}} 停止
+
+ + + + 提交镜像 + + + - {{end}} {{template "base/paginate" .}}
+ {{end}} {{template "base/paginate" .}}
-
- -
- +
+ +
-
-

你确认删除该任务么?此任务一旦删除不可恢复。

+ +
+
{{template "base/footer" .}} @@ -461,7 +438,6 @@ // 点击 (x), 关闭弹窗 for (i = 0; i < spans.length; i++) { spans[i].onclick = function() { - modal.style.display = "none"; } } @@ -485,7 +461,7 @@ parent.location.href if (json1.result_code === "0") { - $('.alert').html('操作成功!').removeClass('alert-warning').addClass('alert-success').show().delay(1500).fadeOut(); + $('.alert').html('操作成功!').removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); } else { $('.alert').html(json1.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut(); }