-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate project package table to bootstrap.
Since we are moving the project view to bootstrap, the package table need to be migrated as well
- Loading branch information
1 parent
2d816a9
commit 972a5de
Showing
7 changed files
with
75 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
function setPackageTable() { // jshint ignore:line | ||
$('#packages-table').DataTable(); | ||
$('#inherited-packages-table').DataTable(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/api/app/views/webui2/webui/project/_project_inherited_packages.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.card-body | ||
- if ipackages.present? | ||
%table.table.table-striped.table-bordered#inherited-packages-table | ||
%thead | ||
%tr | ||
%th Name | ||
%th From | ||
%tbody | ||
- ipackages.each do |ipackage| | ||
%tr | ||
%td | ||
= link_to(ipackage[0], package_show_path(package: ipackage[0], project: ipackage[1])) | ||
%td | ||
= ipackage[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.card-body | ||
- if packages.present? | ||
%table.table.table-striped.table-bordered#packages-table | ||
%thead | ||
%tr | ||
%th Name | ||
%th Changed | ||
%tbody | ||
- packages.each do |package| | ||
%tr | ||
%td | ||
= link_to(package[0], package_show_path(package: package[0], project: project)) | ||
%td | ||
= time_ago_in_words(Time.at(package[1].to_i)) | ||
- else | ||
%p This project does not contain any packages | ||
|
||
- if project.is_a?(Project) && User.current.can_modify?(project) | ||
- if show_package_actions? | ||
.pt-4 | ||
%ul.list-inline | ||
%li.list-inline-item | ||
= link_to(project_new_package_path(project: project)) do | ||
%i.fas.fa-plus-circle.text-primary | ||
Create package | ||
%li.list-inline-item | ||
= link_to(project_new_package_branch_path(project: project)) do | ||
%i.fas.fa-code-branch.text-primary | ||
Branch existing package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters