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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
10ef04d4
Commit
10ef04d4
authored
Jul 25, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add minimal UI for project packages [ci skip]
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c45ecaf9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
0 deletions
+72
-0
app/controllers/projects/packages/packages_controller.rb
app/controllers/projects/packages/packages_controller.rb
+11
-0
app/models/project.rb
app/models/project.rb
+1
-0
app/views/projects/packages/index.html.haml
app/views/projects/packages/index.html.haml
+26
-0
app/views/projects/packages/packages/index.html.haml
app/views/projects/packages/packages/index.html.haml
+30
-0
config/routes/project.rb
config/routes/project.rb
+4
-0
No files found.
app/controllers/projects/packages/packages_controller.rb
0 → 100644
View file @
10ef04d4
module
Projects
module
Packages
class
PackagesController
<
ApplicationController
before_action
:authorize_admin_project!
def
index
@packages
=
project
.
packages
.
all
end
end
end
end
app/models/project.rb
View file @
10ef04d4
...
...
@@ -131,6 +131,7 @@ class Project < ActiveRecord::Base
has_one
:last_event
,
->
{
order
'events.created_at DESC'
},
class_name:
'Event'
has_many
:boards
,
before_add: :validate_board_limit
has_many
:packages
,
class_name:
'Packages::Package'
# Project services
has_one
:campfire_service
...
...
app/views/projects/packages/index.html.haml
0 → 100644
View file @
10ef04d4
-
@no_container
=
true
-
page_title
"Packages"
%div
{
class:
container_class
}
%table
.table
%thead
%tr
%th
Name
%th
Version
%th
Files
%th
Created at
%tbody
-
@packages
.
each
do
|
package
|
%tr
%td
=
package
.
name
%td
=
package
.
version
%td
%ul
-
package
.
package_files
.
each
do
|
package_file
|
%li
=
package_file
.
file
%td
=
package
.
created_at
app/views/projects/packages/packages/index.html.haml
0 → 100644
View file @
10ef04d4
-
@no_container
=
true
-
page_title
"Packages"
%div
{
class:
container_class
}
%table
.table
%thead
%tr
%th
ID
%th
Name
%th
Version
%th
Files
%th
Created at
%tbody
-
@packages
.
each
do
|
package
|
%tr
%td
=
package
.
id
%td
=
package
.
name
%td
=
package
.
version
%td
%ul
.content-list
-
package
.
package_files
.
each
do
|
package_file
|
%li
=
package_file
.
file
.
identifier
%td
=
package
.
created_at
config/routes/project.rb
View file @
10ef04d4
...
...
@@ -310,6 +310,10 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
scope
'-'
do
get
'archive/*id'
,
constraints:
{
format:
Gitlab
::
PathRegex
.
archive_formats_regex
,
id:
/.+?/
},
to:
'repositories#archive'
,
as:
'archive'
## EE-specific
resources
:packages
,
only: :index
,
module:
'packages'
## EE-specific
resources
:jobs
,
only:
[
:index
,
:show
],
constraints:
{
id:
/\d+/
}
do
collection
do
post
:cancel_all
...
...
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