Skip to content

Commit

Permalink
Merge pull request #6658 from saraycp/bootstrap_project_create
Browse files Browse the repository at this point in the history
Migrate project creation page to bootstrap
  • Loading branch information
bgeuken committed Dec 19, 2018
2 parents 30e51fd + ef9e812 commit 5bd21f9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.

This file was deleted.

2 changes: 1 addition & 1 deletion src/api/app/views/webui2/webui/project/_form.html.haml
Expand Up @@ -9,7 +9,7 @@
#{namespace}:
= form.text_field(:name, required: true, class: 'form-control')
- else
= form.label(:name, 'Project Name:', class: 'form-control')
= form.label(:name, 'Project Name:')
= form.text_field(:name, required: true, class: 'form-control')
.form-group
= form.label(:title, 'Title:')
Expand Down
@@ -0,0 +1,10 @@
.modal.fade#new-project-modal{ tabindex: '-1', role: 'dialog', aria: { labelledby: 'new-project-modal-label', hidden: true } }
.modal-dialog.modal-lg{ role: 'document' }
.modal-content
.modal-header
%h5.modal-title#new-project-modal-label
= local_assigns.key?(:project) ? 'Create Subproject' : 'Create Project'
.modal-body
- options = { project: Project.new, configuration: configuration }
- options[:namespace] = project.name if local_assigns.key?(:project)
= render partial: 'form', locals: options
4 changes: 3 additions & 1 deletion src/api/app/views/webui2/webui/project/list.html.haml
Expand Up @@ -32,9 +32,11 @@
Include #{::Configuration.unlisted_projects_filter_description}
- unless User.current.is_nobody?
%li.list-inline-item
= link_to(new_project_path) do
= link_to('#', data: { toggle: 'modal', target: '#new-project-modal' }) do
%i.fas.fa-plus-circle.text-primary
Add New Project
= render partial: 'new_project_modal', locals: { configuration: @configuration }

- cachekey = Digest::MD5.hexdigest(@projects.join)
- projecturl = project_show_path('REPLACEIT')
#project-list
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/views/webui2/webui/project/subprojects.html.haml
Expand Up @@ -16,15 +16,15 @@
%p
%i This project has no subprojects
- if User.current.can_modify?(@project)
= link_to('#', data: { toggle: 'modal', target: '#add-new-subproject-modal' }, title: 'Add New Subproject', class: 'nav-link') do
= link_to('#', data: { toggle: 'modal', target: '#new-project-modal' }, class: 'nav-link') do
%i.fas.fa-plus-circle.text-primary
Add New Subproject
.row.mt-3
.col-md-12
- if @siblings.present?
= render partial: 'projects_table', locals: { table_title: 'Sibling Project', project: @project, projects: @siblings }

= render partial: 'add_new_subproject_modal', locals: { project: @project, configuration: @configuration }
= render partial: 'new_project_modal', locals: { project: @project, configuration: @configuration }

:javascript
initializeDataTable('.projects-table');

0 comments on commit 5bd21f9

Please sign in to comment.