Commit 3dadfcba authored by Filipa Lacerda's avatar Filipa Lacerda

Uses responsive table for index page

Updates detail page header to overflow properly on mobile
parent 11c8e5d2
.table-holder .packages-table {
tr {
th {
border-top: 0;
background: none;
padding: $gl-padding-top 0;
}
td {
padding: $gl-padding-top 0;
}
}
}
- page_title "Packages" - page_title _("Packages")
- can_destroy_package = can?(current_user, :destroy_package, @project) - can_destroy_package = can?(current_user, :destroy_package, @project)
- if @packages.any? - if @packages.any?
.table-holder .table-holder
%table.table.packages-table .gl-responsive-table-row.table-row-header{ role: 'row'}
%thead .table-section.section-30{ role: 'rowheader'}
%tr =_('Name')
%th= _('Name') .table-section.section-20{ role: 'rowheader'}
%th= _('Version') =_('Version')
%th= _('Type') .table-section.section-20{ role: 'rowheader'}
%th= _('Created') =_('Type')
%th .table-section.section-20{ role: 'rowheader'}
=_('Created')
%tbody .table-section.section-10{ role: 'rowheader'}
- @packages.each do |package| - @packages.each do |package|
%tr .gl-responsive-table-row
%td .table-section.section-30
.table-mobile-header{ role: "rowheader" }= _("Name")
.table-mobile-content
= link_to package.name, project_package_path(@project, package) = link_to package.name, project_package_path(@project, package)
%td .table-section.section-20
.table-mobile-header{ role: "rowheader" }= _("Version")
.table-mobile-content
= package.version = package.version
%td .table-section.section-20
.table-mobile-header{ role: "rowheader" }= _("Type")
.table-mobile-content
= _('Maven package') = _('Maven package')
%td .table-section.section-20
.table-mobile-header{ role: "rowheader" }= _("Created")
.table-mobile-content
= time_ago_with_tooltip(package.created_at) = time_ago_with_tooltip(package.created_at)
%td .table-section.section-10
.table-mobile-header{ role: "rowheader" }
.table-mobile-content
- if can_destroy_package - if can_destroy_package
.pull-right .pull-right
= link_to project_package_path(@project, package), method: :delete, data: { confirm: _("Are you sure?") }, class: "btn btn-grouped btn-inverted btn-remove", title: _('Delete Package') do = link_to project_package_path(@project, package), method: :delete, data: { confirm: _("Are you sure?") }, class: "btn btn-grouped btn-inverted btn-remove", title: _('Delete Package') do
= icon('trash') = icon('trash')
= paginate @packages, theme: "gitlab" = paginate @packages, theme: "gitlab"
- else - else
.nothing-here-block .nothing-here-block
= _('No packages stored for this project.') = _('No packages stored for this project.')
- add_to_breadcrumbs _("Packages"), project_packages_path(@project) - add_to_breadcrumbs _("Packages"), project_packages_path(@project)
- add_to_breadcrumbs @package.name, project_packages_path(@project) - add_to_breadcrumbs @package.name, project_packages_path(@project)
- breadcrumb_title @package.version - breadcrumb_title @package.version
- page_title "Packages" - page_title _("Packages")
.detail-page-header .detail-page-header.d-flex.justify-content-between
.detail-page-header-body
%strong %strong
= @package.version = @package.version
.detail-page-header-actions
- if can?(current_user, :destroy_package, @project) - if can?(current_user, :destroy_package, @project)
= link_to project_package_path(@project, @package), method: :delete, data: { confirm: _("Are you sure?") }, class: "btn btn-grouped btn-inverted btn-remove", title: _('Delete Package') do = link_to project_package_path(@project, @package), method: :delete, data: { confirm: _("Are you sure?") }, class: "btn btn-grouped btn-inverted btn-remove", title: _('Delete Package') do
= _('Delete') = _('Delete')
.row.prepend-top-default .row.prepend-top-default
.col-md-6 .col-sm-6
.card .card
.card-header .card-header
%strong= _('Package information') %strong= _('Package information')
...@@ -32,7 +31,7 @@ ...@@ -32,7 +31,7 @@
= _('Created on') = _('Created on')
%span.pull-right %span.pull-right
= @package.created_at.to_s(:medium) = @package.created_at.to_s(:medium)
.col-md-6 .col-sm-6
- if @maven_metadatum - if @maven_metadatum
.card .card
.card-header .card-header
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment