summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-03-31 19:29:25 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-03-31 19:37:38 +0100
commitab46353fd9c0c76c137bf828788ecbc34d0fe99a (patch)
treed8fa638ce4d531e43a28c34930031c3cee899035 /app/views/projects
parente3fbcd0093b07bbc084061992bb8ae6bd4343d52 (diff)
downloadgitlab-ce-ab46353fd9c0c76c137bf828788ecbc34d0fe99a.tar.gz
Added ProtectedTags#show page
Uncommented protected tags feature specs copied from protected branches
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/protected_tags/_matching_tag.html.haml9
-rw-r--r--app/views/projects/protected_tags/show.html.haml25
2 files changed, 34 insertions, 0 deletions
diff --git a/app/views/projects/protected_tags/_matching_tag.html.haml b/app/views/projects/protected_tags/_matching_tag.html.haml
new file mode 100644
index 00000000000..97e5cd6f9d2
--- /dev/null
+++ b/app/views/projects/protected_tags/_matching_tag.html.haml
@@ -0,0 +1,9 @@
+%tr
+ %td
+ = link_to matching_tag.name, namespace_project_tree_path(@project.namespace, @project, matching_tag.name)
+ - if @project.root_ref?(matching_tag.name)
+ %span.label.label-info.prepend-left-5 default
+ %td
+ - commit = @project.commit(matching_tag.name)
+ = link_to(commit.short_id, namespace_project_commit_path(@project.namespace, @project, commit.id), class: 'commit_short_id')
+ = time_ago_with_tooltip(commit.committed_date)
diff --git a/app/views/projects/protected_tags/show.html.haml b/app/views/projects/protected_tags/show.html.haml
new file mode 100644
index 00000000000..185807a7e8d
--- /dev/null
+++ b/app/views/projects/protected_tags/show.html.haml
@@ -0,0 +1,25 @@
+- page_title @protected_tag.name, "Protected Tags"
+
+.row.prepend-top-default.append-bottom-default
+ .col-lg-3
+ %h4.prepend-top-0
+ = @protected_tag.name
+
+ .col-lg-9
+ %h5 Matching Tags
+ - if @matching_tags.present?
+ .table-responsive
+ %table.table.protected-tags-list
+ %colgroup
+ %col{ width: "30%" }
+ %col{ width: "30%" }
+ %thead
+ %tr
+ %th Tag
+ %th Last commit
+ %tbody
+ - @matching_tags.each do |matching_tag|
+ = render partial: "matching_tag", object: matching_tag
+ - else
+ %p.settings-message.text-center
+ Couldn't find any matching tags.