#354: start UI
This commit is contained in:
parent
1183f009e3
commit
f33272f8aa
|
@ -0,0 +1,17 @@
|
|||
RosaABF.controller('ProjectScheduleController', ['$scope', '$http', function($scope, $http) {
|
||||
|
||||
// See: Platfrom::AUTOMATIC_METADATA_REGENERATIONS
|
||||
// $scope.items = {
|
||||
// 'day': 'platform.automatic_metadata_regeneration.day',
|
||||
// 'week': 'platform.automatic_metadata_regeneration.week'
|
||||
// };
|
||||
$scope.project_id = null;
|
||||
|
||||
$scope.update = function() {
|
||||
$http.put(
|
||||
Routes.project_path($scope.platform_id),
|
||||
{project: {autostart_status: $scope.autostart_status}, format: 'json'}
|
||||
);
|
||||
}
|
||||
|
||||
}]);
|
|
@ -56,16 +56,6 @@
|
|||
id_element: '#project_maintainer_id',
|
||||
placeholder: @project.maintainer.fullname
|
||||
|
||||
%h3= t("layout.projects.build_schedule")
|
||||
= form_for @project, html: { class: :form, multipart: true } do |f|
|
||||
.leftlist= f.label :default_platforms
|
||||
.rightlist= f.select :default_platforms, Platform.main.map{ |p| [p.name, p.id] }, {include_blank: true}, multiple: true, size: 5
|
||||
.both
|
||||
|
||||
.leftlist= f.label :autostart_status
|
||||
.rightlist= f.select :autostart_status, Project::AUTOSTART_STATUSES.collect{|status| [Project.human_autostart_status(status), status]}, {include_blank: true, selected: @project.autostart_status}
|
||||
.both
|
||||
|
||||
- if [:new, :create].include? act
|
||||
.leftlist= f.label :srpm
|
||||
.rightlist= f.file_field :srpm, class: 'file_field'
|
||||
|
|
|
@ -4,6 +4,17 @@
|
|||
|
||||
= form_for @project, html: { class: :form, multipart: true } do |f|
|
||||
= render "form", f: f
|
||||
.hr
|
||||
|
||||
%h3= t("layout.projects.build_schedule")
|
||||
= form_for @project, html: { class: :form, multipart: true, 'ng-controller' => 'ProjectScheduleController', 'ng-init' => "project_id = #{@project.id}" } do |f|
|
||||
/ .leftlist= f.label :default_platforms
|
||||
/ .rightlist= f.select :default_platforms, Platform.main.map{ |p| [p.name, p.id] }, {include_blank: true}, multiple: true, size: 5
|
||||
/ .both
|
||||
|
||||
.leftlist= f.label :autostart_status
|
||||
.rightlist= f.select :autostart_status, Project::AUTOSTART_STATUSES.collect{|status| [Project.human_autostart_status(status), status]}, {include_blank: true, selected: @project.autostart_status}
|
||||
.both
|
||||
|
||||
.hr
|
||||
.leftside= t("layout.projects.delete_warning")
|
||||
|
|
|
@ -93,6 +93,7 @@ en:
|
|||
attributes:
|
||||
project:
|
||||
url: URL
|
||||
autostart_status: Autostart
|
||||
add_to_repository_id: Add to repository
|
||||
srpms_list: SRPMs list
|
||||
name: Name
|
||||
|
|
|
@ -93,6 +93,7 @@ ru:
|
|||
attributes:
|
||||
project:
|
||||
url: URL
|
||||
autostart_status: Автостарт
|
||||
add_to_repository_id: Добавить в репозиторий
|
||||
srpms_list: Список SRPMs
|
||||
name: Название
|
||||
|
|
Loading…
Reference in New Issue