[#369] update new build list page; work in progress

This commit is contained in:
Alexander Machehin 2014-10-23 18:49:57 +06:00
parent ca326c2db6
commit 344cc19480
7 changed files with 43 additions and 83 deletions

View File

@ -3,12 +3,10 @@
//= require jquery-ui
//= require js-routes
//= require autocomplete-rails
//= require extra/autocomplete-form
// require autocomplete-rails
// require extra/autocomplete-form
//= require bootstrap-sprockets
// Loads all Bootstrap javascripts
//= require bootstrap
//= require angular
//= require angular-sanitize

View File

@ -1,6 +1,6 @@
.col-md-5.col-md-offset-2
%h4= t 'activerecord.attributes.build_list.build_for_platform'
.offset20{ 'ng-repeat' => 'platform in newBuildCtrl.platforms',
.boffset20{ 'ng-repeat' => 'platform in newBuildCtrl.platforms',
'ng-hide' => 'newBuildCtrl.hidePlatform(platform)' }
%div
%h5 {{ platform.name }}

View File

@ -3,26 +3,26 @@
= render 'include_repos'
.col-md-5
%h4.boffset20= t 'activerecord.attributes.build_list.save_to_repository'
%select.form-control{ 'ng-model' => 'newBuildCtrl.save_to_repository',
%h4= t 'activerecord.attributes.build_list.save_to_repository'
%select.form-control.boffset20{ 'ng-model' => 'newBuildCtrl.save_to_repository',
'ng-options' => 'save_in_repo.name for save_in_repo in newBuildCtrl.save_to_repositories',
'ng-change' => 'newBuildCtrl.selectSaveToRepository()' }
%h4.boffset20= t 'activerecord.attributes.build_list.project_version'
%select.form-control{ 'ng-model' => 'newBuildCtrl.project_version',
%h4= t 'activerecord.attributes.build_list.project_version'
%select.form-control.boffset20{ 'ng-model' => 'newBuildCtrl.project_version',
'ng-options' => 'version.name group by version.kind for version in newBuildCtrl.project_versions' }
%h3= t 'activerecord.attributes.build_list.arch'
.checkbox{ 'ng-repeat' => 'arch in newBuildCtrl.arches' }
%h4= t 'activerecord.attributes.build_list.arch'
.checkbox.boffset20{ 'ng-repeat' => 'arch in newBuildCtrl.arches' }
%label
%input{ type: 'checkbox',
'ng-model' => 'arch.checked',
name: 'arches[]' }
{{ arch.name }}
%h3= t 'activerecord.attributes.build_list.update_type'
%h4= t 'activerecord.attributes.build_list.update_type'
- selected = params[:build_list].try(:[], :update_type) ? {selected: params[:build_list][:update_type]} : {}
= f.select :update_type, BuildList::UPDATE_TYPES, selected, class: 'form-control'
= f.select :update_type, BuildList::UPDATE_TYPES, selected, class: 'form-control boffset20'
= render 'shared/autocomplete_form',
field: :extra_repositories,

View File

@ -9,7 +9,7 @@
.pull-right#fork-and-edit.roffset5
= link_to t('layout.projects.fork_and_edit'), '#', class: 'btn btn-primary',
'data-toggle' => 'modal', 'data-target' => '#forkModal'
#forkModal.modal.fade{ tabindex: '-1', role: 'dialog', 'aria-labelledby' => 'myModalLabel', 'aria-hidden' => 'true' }
#forkModal.modal.fade{ tabindex: '-1', role: 'dialog', 'aria-labelledby' => 'forkModalLabel', 'aria-hidden' => 'true' }
.modal-dialog
.modal-content
.modal-header

View File

@ -9,55 +9,13 @@
- default_values ||= []
- subject_class = subject.class.name.underscore
.modal.fade{ id: "#{field}_dialog", tabindex: '-1', role: 'dialog', 'aria-labelledby' => "myModalLabel",
'aria-hidden' => 'true'}
.modal-dialog
.modal-content
.modal-header
%button.close{ type: 'button', 'data-dismiss' => 'modal', 'aria-hidden' => 'true' } ×
%h4.modal-title= t "activerecord.attributes.build_list.#{field}"
.modal-body= render "shared/autocomplete_docs/#{field}"
.modal-footer
%button.btn.btn-default{ type: 'button', 'data-dismiss' => 'modal' }= t 'close'
.autocomplete-form{subject_class: subject_class, field: field, path: autocomplete_path, class: field}
%h3
= t "activerecord.attributes.build_list.#{field}"
%i.fa.fa-question-circle{ 'data-toggle' => 'modal', 'data-target' => "##{field}_dialog" }
%input.form-control{ type: 'text', 'ng-model' => "async_#{field}_selected", placeholder: placeholder,
'typeahead' => "extra for extra in get_#{field}($viewValue)", 'typeahead-loading' => "loading_#{field}",
'typeahead-on-select' => "select_#{field}($item, $model, $label)" }
%i.glyphicon.glyphicon-refresh{ 'ng-show' => "loading_#{field}" }
.row
= hidden_field_tag field, nil, id: "#{field}_field"
= hidden_field_tag field, nil, id: "#{field}_field_path"
= hidden_field_tag field, nil, id: "#{field}_field_label"
.col-xs-6
.form-group
= autocomplete_field_tag field, nil,
"#{autocomplete_path}?#{{platform_id: subject.save_to_platform.try(:id)}.to_param}",
placeholder: placeholder, class: 'autocomplete form-control',
update_elements: { id: "##{field}_field", path: "##{field}_field_path", label: "##{field}_field_label" }
.col-xs-2= submit_tag t('layout.add'), class: 'btn btn-default add'
%table.table.table-bordered
%tbody
- field_name = "#{subject_class}[#{field}][]"
- field_class.where(id: params[:build_list].try(:[], field) ).each do |extra|
%tr
%td
- if extra.is_a?(BuildList)
= link_to "#{extra.id} (#{extra.project.name} - #{extra.arch.name})", extra
- else
= link_to "#{extra.platform.name}/#{extra.name}", [extra.platform, extra]
.actions.pull-right
= hidden_field_tag field_name, extra.id
%span.fa.fa-times.fa-lg.delete.text-danger
.default-values
- field_class.where(id: default_values).each do |extra|
.hidden{ label: "#{extra.platform.name}/#{extra.name}",
path: url_for([extra.platform, extra]),
name: field_name, value: extra.id }
%h4
= t "activerecord.attributes.build_list.#{field}"
-#%a{ href: '#', tabindex: 0, class: 'btn btn-lg btn-danger bs-docs-popover boffset20', 'data-toggle' => 'popover',
'data-trigger' => 'focus', title: t("activerecord.attributes.build_list.#{field}"),
html: 'true', 'data-content' => "And here's some amazing content. It's very engaging. Right?" }
%i.fa.fa-question-circle
%button.btn.btn-default{ popover: render("shared/autocomplete_docs/#{field}"),
'popover-title' => t("activerecord.attributes.build_list.#{field}") }
%i.fa.fa-question-circle

View File

@ -1,14 +1,16 @@
:markdown
__Ability to attach at assembly repositories of platforms as additional sources of packages.__
<br/>
%p
%strong Ability to attach at assembly repositories of platforms as additional sources of packages.
%br
%p
Requirements for attaching repositories:
%ul
%li attaching repositories from other platform available only for build list into the personal platform.
- attaching repositories from other platform available only for build list into the personal platform.
%p
How to attach a repository:
%ul
%li write the name of platform, choose repository from the list for attaching and click to "Add" button.
- write the name of platform, choose repository from the list for attaching and click to "Add" button.
_Example: correct input "uxteam_personal", wrong - "uxteam_personal/main"._
%p
%em Example: correct input "uxteam_personal", wrong - "uxteam_personal/main".

View File

@ -1,14 +1,16 @@
:markdown
__Возможность подключить для сборки репозитории платформ как дополнительные источники пакетов.__
<br/>
%p
%strong Возможность подключить для сборки репозитории платформ как дополнительные источники пакетов.
%br
%p
Требования для репозиториев:
%ul
%li использовать репозитории из других персональных платформ возможно только для сборки в персональную платформу.
- использовать репозитории из других персональных платформ возможно только для сборки в персональную платформу.
%p
Как подключить репозиторий:
%ul
%li добавьте имя платформы, затем из списка выберете репозиторий для поключения и нажмите кнопку "Добавить".
- добавьте имя платформы, затем из списка выберете репозиторий для поключения и нажмите кнопку "Добавить".
ример: правильно ввести "uxteam_personal", неправильно: "uxteam_personal/main"._
%p
%em Пример: правильно ввести "uxteam_personal", неправильно: "uxteampersonal/main".