Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
37a274a5
Commit
37a274a5
authored
Aug 17, 2014
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tags count if tag gets deleted
parent
6c9cb565
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
14 deletions
+56
-14
app/controllers/projects/tags_controller.rb
app/controllers/projects/tags_controller.rb
+1
-1
app/views/projects/commits/_head.html.haml
app/views/projects/commits/_head.html.haml
+1
-1
app/views/projects/tags/destroy.js.haml
app/views/projects/tags/destroy.js.haml
+3
-0
app/views/projects/tags/index.html.haml
app/views/projects/tags/index.html.haml
+13
-12
features/project/commits/tags.feature
features/project/commits/tags.feature
+10
-0
features/steps/project/browse_tags.rb
features/steps/project/browse_tags.rb
+28
-0
No files found.
app/controllers/projects/tags_controller.rb
View file @
37a274a5
...
...
@@ -34,7 +34,7 @@ class Projects::TagsController < Projects::ApplicationController
respond_to
do
|
format
|
format
.
html
{
redirect_to
project_tags_path
}
format
.
js
{
render
nothing:
true
}
format
.
js
end
end
end
app/views/projects/commits/_head.html.haml
View file @
37a274a5
...
...
@@ -12,7 +12,7 @@
=
nav_link
(
controller: :tags
)
do
=
link_to
project_tags_path
(
@project
)
do
Tags
%span
.badge
=
@repository
.
tags
.
length
%span
.badge
.js-totaltags-count
=
@repository
.
tags
.
length
=
nav_link
(
controller: :repositories
,
action: :stats
)
do
=
link_to
stats_project_repository_path
(
@project
)
do
...
...
app/views/projects/tags/destroy.js.haml
0 → 100644
View file @
37a274a5
$('.js-totaltags-count').html("
#{
@repository
.
tags
.
size
}
")
-
if
@repository
.
tags
.
size
==
0
$('.tags').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000)
app/views/projects/tags/index.html.haml
View file @
37a274a5
...
...
@@ -12,14 +12,15 @@
Tags give the ability to mark specific points in history as being important
%hr
-
unless
@tags
.
empty?
.tags
-
unless
@tags
.
empty?
%ul
.bordered-list
-
@tags
.
each
do
|
tag
|
=
render
'tag'
,
tag:
@repository
.
find_tag
(
tag
)
=
paginate
@tags
,
theme:
'gitlab'
-
else
-
else
.nothing-here-block
Repository has no tags yet.
%br
...
...
features/project/commits/tags.feature
View file @
37a274a5
...
...
@@ -27,5 +27,15 @@ Feature: Project Browse tags
And
I submit new tag form with tag that already exists
Then
I should see new an error that tag already exists
@javascript
Scenario
:
I
delete a tag
Given
I delete tag 'v1.1.0'
Then
I should not see tag 'v1.1.0'
@javascript
Scenario
:
I
delete all tags and see info message
Given
I delete all tags
Then
I should see tags info message
# @wip
# Scenario: I can download project by tag
features/steps/project/browse_tags.rb
View file @
37a274a5
...
...
@@ -51,4 +51,32 @@ class ProjectBrowseTags < Spinach::FeatureSteps
step
'I should see new an error that tag already exists'
do
page
.
should
have_content
'Tag already exists'
end
step
"I delete tag 'v1.1.0'"
do
within
'.tags'
do
first
(
'.btn-remove'
).
click
sleep
0.05
end
end
step
"I should not see tag 'v1.1.0'"
do
within
'.tags'
do
page
.
all
(
visible:
true
).
should_not
have_content
'v1.1.0'
end
end
step
'I delete all tags'
do
within
'.tags'
do
all
(
'.btn-remove'
).
each
do
|
remove
|
remove
.
click
sleep
0.05
end
end
end
step
'I should see tags info message'
do
within
'.tags'
do
page
.
should
have_content
'Repository has no tags yet.'
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment