Continuing work on the new interface

This commit is contained in:
Wedge 2016-05-22 15:25:00 +03:00
parent 519e590c69
commit b8fa4eb347
62 changed files with 1123 additions and 1274 deletions

View File

@ -0,0 +1,13 @@
RosaABF.controller('MembersController', ['$scope', '$http',
function($scope, $http) {
$scope.getUsers = function(name) {
var params = {format: 'json', query: name};
return $http.get(Routes.autocomplete_user_uname_autocompletes_path(params)).then(function(response) {
return response.data;
});
}
$scope.select = function($item, $model, $name) {
$scope.memberId = $item.id;
}
}]);

View File

@ -1,9 +1,13 @@
RosaABF.controller('ProductBuildListController', ['$scope', '$http', '$timeout', 'SoundNotificationsHelper', function($scope, $http, $timeout, SoundNotificationsHelper) {
$scope.id = $('#product_build_list_id').val();
$scope.pbl = null;
$scope.subject = {}; // See: shared/build_results
$scope.init = function(id) {
$scope.id = id;
$scope.refresh();
}
$scope.getProductBuildList = function() {
$http.get(Routes.product_build_list_path($scope.id, {format: 'json'})).success(function(results) {
var product_build_list = results.product_build_list;
@ -26,7 +30,6 @@ RosaABF.controller('ProductBuildListController', ['$scope', '$http', '$timeout',
}
$scope.cancelRefresh = $timeout($scope.refresh, 10000);
}
$scope.refresh();
$scope.updateStatus = function() {
$http.put(

View File

@ -1,24 +1,22 @@
RosaABF.controller 'ProfileController', ['$scope', '$http', '$location', ($scope, $http, $location) ->
RosaABF.controller 'ProfileController', ['$scope', '$http', ($scope, $http) ->
$scope.subject = $('#subject_uname').val()
$scope.processing = true
$scope.projects = []
$scope.page = null
$scope.total_items = null
$scope.term = null
$scope.visibility = 'all'
# Fixes: redirect to page after form submit
$("#search_projects_form").on 'submit', ->
false
$scope.init = (subject) ->
$scope.subject = subject
$scope.refresh()
return
$scope.refresh = ->
$scope.processing = true
params =
term: $scope.term
visibility: $scope.visibility
visibility: 'all'
page: $scope.page
format: 'json'
@ -33,23 +31,16 @@ RosaABF.controller 'ProfileController', ['$scope', '$http', '$location', ($scope
true
$scope.search = ->
params =
term: $scope.term
visibility: $scope.visibility
$location.search params
$scope.$on '$locationChangeSuccess', (event) ->
$scope.updateParams()
$scope.search = (term) ->
$scope.term = term
$scope.refresh()
$scope.updateParams = ->
params = $location.search()
$scope.term = params['term']
$scope.visibility = params['visibility'] if params['visibility']
$scope.page = params['page']
return
$scope.goToPage = (number) ->
$location.search 'page', number
$scope.page = number
$scope.refresh()
return
return
]

View File

@ -0,0 +1,33 @@
RosaABF.controller('ProjectsVersionsTypeaheadController', ['$scope', '$http', '$sce', function($scope, $http, $sce) {
$scope.loadingVersions = false;
$scope.init = function(platform, projectName, projectId, projectVersion) {
$scope.platform = platform;
$scope.project = projectName;
$scope.projectId = projectId;
if(projectId) {
var params = {id: projectId};
if(projectVersion) {
params.projectVersion = projectVersion;
}
$scope.selectProject(params);
}
}
$scope.getProjects = function(query) {
var params = { query: query, format: 'json'};
return $http.get(Routes.autocomplete_project_platform_products_path($scope.platform, params)).then(function(res) {
return res.data;
});
}
$scope.selectProject = function($item) {
$scope.projectId = $item.id;
$scope.loadingVersions = true;
var params = {project_id: $item.id, format: 'json', project_version: $item.projectVersion};
$http.get(Routes.project_versions_platform_products_path($scope.platform, params)).then(function(res) {
$scope.projectVersions = $sce.trustAsHtml(res.data.project_versions);
$scope.loadingVersions = false;
});
}
}]);

View File

@ -8,7 +8,6 @@ angular
function rdWidgetFooter() {
var directive = {
requires: '^rdWidget',
transclude: true,
replace: true,
template: '<div class="widget-footer" ng-transclude></div>',

View File

@ -12,10 +12,11 @@ function rdWidgetTitle() {
replace: true,
scope: {
title: '@',
icon: '@'
icon: '@',
customClass: '@'
},
transclude: true,
template: '<div class="widget-header"><div class="row"><div class="pull-left"><i class="fa" ng-class="icon"></i> {{title}} </div><div class="pull-right col-xs-6 col-sm-4" ng-transclude></div></div></div>',
template: '<div class="widget-header"><div class="row"><div class="pull-left"><i class="fa" ng-class="icon"></i> {{title}} </div><div class="pull-right" ng-class="[{\'col-xs-6\': !customClass, \'col-sm-4\': !customClass}, customClass]" ng-transclude></div></div></div>',
restrict: 'E'
};
return directive;

View File

@ -1,6 +1,5 @@
RosaABF.controller 'ContentsController', ['$scope', '$http', '$location', ($scope, $http, $location) ->
$scope.platform = $('#platform_name').val()
$scope.processing = true
$scope.contents = []
$scope.folders = []
@ -16,9 +15,9 @@ RosaABF.controller 'ContentsController', ['$scope', '$http', '$location', ($scop
params =
platform_id: $scope.platform
path: $('#path').val()
term: $('#platform_term').val()
page: $('#page').val()
path: $scope.path
term: $scope.term
page: $scope.page
format: 'json'
$http.get(Routes.platform_contents_path(params)).success( (data) ->
@ -54,8 +53,8 @@ RosaABF.controller 'ContentsController', ['$scope', '$http', '$location', ($scop
)
true
$scope.search = ->
$location.search('term', $('#platform_term').val())
$scope.search = (term) ->
$location.search('term', term)
$scope.$on '$locationChangeSuccess', (event) ->
$scope.updateParams()
@ -63,9 +62,9 @@ RosaABF.controller 'ContentsController', ['$scope', '$http', '$location', ($scop
$scope.updateParams = ->
params = $location.search()
$('#path').val(params['path'])
$('#platform_term').val(params['term'])
$('#page').val(params['page'])
$scope.path = params['path']
$scope.term = params['term']
$scope.page = params['page']
$scope.goToPage = (number) ->
$location.search('page', number)

View File

@ -1,24 +1,29 @@
RosaABF.controller 'RepositoryProjectsController', ['$scope', '$http', '$location', 'confirmMessage', ($scope, $http, $location, confirmMessage) ->
$scope.added = $('#added').val()
$scope.platform_id = $('#platform_id').val()
$scope.repository_id = $('#repository_id').val()
RosaABF.controller 'RepositoryProjectsController',
['$scope', '$http', 'confirmMessage',
($scope, $http, confirmMessage) ->
$scope.page = 1
$scope.owner_name = ""
$scope.project_name = ""
$scope.processing = true
$scope.projects = []
$scope.total_items = null
# Fixes: redirect to page after form submit
$("#search_projects_form").on 'submit', ->
false
$scope.init = (added, repository_id, platform_id) ->
$scope.added = added
$scope.platform_id = platform_id
$scope.repository_id = repository_id
$scope.refresh()
true
$scope.refresh = ->
$scope.processing = true
params =
added: $scope.added
owner_name: $('#project_owner').val()
project_name: $('#project_name').val()
page: $('#page').val()
owner_name: $scope.owner_name
project_name: $scope.project_name
page: $scope.page
sSortDir_0: 'asc'
format: 'json'
path = Routes.projects_list_platform_repository_path $scope.platform_id, $scope.repository_id
@ -32,24 +37,16 @@ RosaABF.controller 'RepositoryProjectsController', ['$scope', '$http', '$locatio
true
$scope.search = ->
params =
owner_name: $('#project_owner').val()
project_name: $('#project_name').val()
$location.search(params)
$scope.$on '$locationChangeSuccess', (event) ->
$scope.updateParams()
$scope.search = (owner, name) ->
$scope.owner_name = owner
$scope.project_name = name
$scope.refresh()
$scope.updateParams = ->
params = $location.search()
$('#project_owner').val(params['owner_name'])
$('#project_name').val(params['project_name'])
$('#page').val(params['page'])
true
$scope.goToPage = (number) ->
$location.search('page', number)
$scope.page = number
$scope.refresh()
true
$scope.removeProject = (project) ->
return false unless confirmMessage.show()
@ -60,4 +57,7 @@ RosaABF.controller 'RepositoryProjectsController', ['$scope', '$http', '$locatio
return pr.id is project.id
)
false
return
]

View File

@ -1,3 +1,6 @@
a {
cursor: pointer;
}
.content-wrapper {
padding-left: 0;
margin-left: 0;
@ -57,7 +60,6 @@
.row.header {
height: 60px;
background: #fff;
/*margin-bottom: 15px;*/
}
.row.header > div:last-child {
padding-right: 0;
@ -433,6 +435,10 @@ ul.sidebar .sidebar-list .menu-icon {
.widget .widget-body div.alert {
margin-bottom: 10px;
}
.widget .widget-body.huge {
height: 700px;
overflow-y: auto;
}
.widget .widget-body.large {
height: 350px;
overflow-y: auto;
@ -492,6 +498,9 @@ ul.sidebar .sidebar-list .menu-icon {
.bottom-space {
margin-bottom: 15px;
}
.no-margin {
margin: 0;
}
table tbody td.build-list-statuses .status {
float: left;
border: 1px solid #DDD;
@ -515,3 +524,23 @@ table tbody tr.group-end td {
.form-inline > * {
margin-left: 5px;
}
.buttons-block > div {
margin-bottom: 15px;
}
.buttons-block > div:last-of-kind {
margin-bottom: 0;
}
.pre-fail-reason {
border: none;
border-radius: 0;
background: none;
padding: 0;
margin: 0;
}
.navbar-account > li > a {
padding-top: 20px !important;
padding-bottom: 20px !important;
}
table {
margin-bottom: 0 !important;
}

View File

@ -4,7 +4,7 @@ class Platforms::ProductsController < Platforms::BaseController
before_action :authenticate_user!
skip_before_action :authenticate_user!, only: [:index, :show] if APP_CONFIG['anonymous_access']
before_action :load_product, except: %i(index new create autocomplete_project)
before_action :load_product, except: %i(index new create autocomplete_project project_versions)
def index
authorize @platform.products.new
@ -56,7 +56,10 @@ class Platforms::ProductsController < Platforms::BaseController
authorize :project
@items = ProjectPolicy::Scope.new(current_user, Project).membered.
by_owner_and_name(params[:query]).limit(20)
#items.select! {|e| e.repo.branches.count > 0}
end
def project_versions
authorize @project = Project.find(params[:project_id])
end
private

View File

@ -77,6 +77,9 @@ class Platforms::RepositoriesController < Platforms::BaseController
end
end
def manage_projects
end
def add_project
authorize @repository
if projects_list = params.try(:[], :repository).try(:[], :projects_list)

View File

@ -25,7 +25,8 @@ module PaginateHelper
per_page: params[:per_page].to_i > 0 ? params[:per_page] : 20,
total_items: 'total_items',
page: 'page',
select_page: "goToPage(page)"
select_page: "goToPage(page)",
rd_widget_footer: false
}
)

View File

@ -216,13 +216,13 @@ class Platform < ActiveRecord::Base
# umount_directory_for_rsync # TODO ignore errors
Arch.all.each do |arch|
str = "country=Russian Federation,city=Moscow,latitude=52.18,longitude=48.88,bw=1GB,version=2011,arch=#{arch.name},type=distrib,url=#{public_downloads_url}\n"
File.open(File.join(symlink_path, "#{name}.#{arch.name}.list"), 'w') {|f| f.write(str) }
File.open(File.join(path, "#{name}.#{arch.name}.list"), 'w') {|f| f.write(str) }
end
end
later :symlink_directory, queue: :middle
def remove_symlink_directory
system("rm -Rf #{symlink_path}")
#system("rm -Rf #{symlink_path}")
end
def update_owner_relation

View File

@ -5,6 +5,7 @@ class ProjectPolicy < ApplicationPolicy
end
alias_method :dashboard?, :index?
alias_method :autocomplete_project?, :index?
alias_method :project_versions?, :index?
alias_method :remove_user?, :index?
alias_method :preview?, :index?

View File

@ -36,10 +36,11 @@ class RepositoryPolicy < ApplicationPolicy
alias_method :add_member?, :packages?
alias_method :sync_lock_file?, :packages?
def add_project?
def manage_projects?
is_admin? || local_admin?(record.platform) || repository_user_ids.include?(user.id)
end
alias_method :remove_project?, :add_project?
alias_method :add_project?, :manage_projects?
alias_method :remove_project?, :manage_projects?
def settings?
is_admin? || owner?(record.platform) || local_admin?(record.platform)

View File

@ -2,7 +2,7 @@
= render 'groups/base/submenu'
.container.col-md-offset-2.col-md-8
.container.col-md-offset-1.col-md-10
.row
= render 'shared/members_table',
remove_members_path: remove_group_members_path(@group),

View File

@ -2,8 +2,11 @@
= render 'groups/base/submenu'
.container.col-md-offset-2.col-md-8
.row
.row
.col-md-offset-2.col-md-8
rd-widget
rd-widget-header title=t('layout.groups.edit')
rd-widget-body
= simple_form_for @group,
html: { class: 'form-horizontal' },
url: profile_group_path(@group),
@ -14,8 +17,7 @@
= render 'form', f: f
- if policy(@group).destroy?
.row
hr
.row.top-space
.alert.alert-danger
= t('layout.groups.delete_warning')
= link_to t('layout.delete'),

View File

@ -1,13 +1,16 @@
-set_meta_tags title: t('layout.groups.list_header')
.row
.col-md-6.col-md-offset-3
= link_to t("layout.groups.new"), new_group_path, class: "btn btn-primary"
%table.table.table-hover.offset10
.row.top-space
.col-md-8.col-md-offset-2
%rd-widget
%rd-widget-header{title: t('layout.groups.list_header')}
= link_to t("layout.groups.new"), new_group_path, class: "btn btn-primary pull-right"
%rd-widget-body{class: "no-padding"}
%table.table.table-condensed
%thead
%tr
%th= t 'layout.groups.group'
%th= t 'layout.groups.description'
%th.col-sm-1= t 'layout.groups.leave_group'
%th= t 'layout.groups.leave_group'
%tbody
- @groups.each do |group|
%tr

View File

@ -1,33 +1,28 @@
- title = title_object(@group)
- set_meta_tags title: title
- set_meta_tags og: { title: title, description: truncate(@group.description, length: 255) }
- set_meta_tags twitter: { title: title, description: truncate(@group.description, length: 200) }
= render 'groups/base/submenu'
.row
.col-md-2.col-md-offset-1
.col-md-10.col-md-offset-1
rd-widget
rd-widget-header title=title
rd-widget-body
.row
.col-md-2
- size = User::AVATAR_SIZES[:big]
= image_tag avatar_url(@group, :big),
alt: @group.uname, height: size, width: size
.col-md-8
h2
= @group.uname
h4
= t('activerecord.attributes.group.description')
.col-md-10
p
= @group.description
hr
.row
.row.top-space
.col-md-8.col-md-offset-1 ng-controller='ProfileController'
= render 'users/profile/projects', subject: @group
.col-md-2
.panel.panel-default
.panel-heading
b
= t('layout.collaborators.members')
.panel-body
rd-widget
rd-widget-header title=t('layout.collaborators.members')
rd-widget-body
- size = User::AVATAR_SIZES[:micro]
- @members.each do |member|
p

View File

@ -38,11 +38,14 @@ html
li.divider
li.link= link_to t('layout.logout'), destroy_user_session_path, method: :delete
- else
ul.nav.navbar-nav
ul.nav.navbar-nav.navbar-account
li= link_to t('layout.devise.shared_links.sign_up'), new_user_registration_path
li= link_to t('layout.devise.shared_links.sign_in'), new_user_session_path
.meta
.page
= form_tag search_index_path, method: 'get', role: 'search', class: 'navbar-left' do
= text_field_tag 'query', @query, placeholder: t('layout.search.header'), class: 'form-control'
== yield :submenu if content_for?(:submenu)
== render 'layouts/noscript'
== render "layouts/flashes"

View File

@ -17,8 +17,8 @@
li class=('active' if contr == :contents)
= link_to t('layout.platforms.contents'), platform_contents_path(@platform)
- if policy(@platform).show?
li class=('active' if act == :index && contr == :maintainers)
= link_to t("layout.platforms.maintainers"), platform_maintainers_path(@platform)
/ li class=('active' if act == :index && contr == :maintainers)
/ = link_to t("layout.platforms.maintainers"), platform_maintainers_path(@platform)
li class=('active' if contr == :mass_builds)
= link_to t("layout.platforms.mass_build"), platform_mass_builds_path(@platform)
- if policy(@platform.products.build).show?
@ -30,8 +30,8 @@
- if policy(@platform).local_admin_manage?
li class=('active' if act == :members && contr == :platforms)
= link_to t("layout.platforms.members"), members_platform_path(@platform)
- if policy(@platform).edit?
li class=('active' if contr == :key_pairs)
= link_to t("layout.key_pairs.header"), platform_key_pairs_path(@platform)
li class=('active' if contr == :tokens)
= link_to t('layout.tokens.header'), platform_tokens_path(@platform)
/ - if policy(@platform).edit?
/ li class=('active' if contr == :key_pairs)
/ = link_to t("layout.key_pairs.header"), platform_key_pairs_path(@platform)
/ li class=('active' if contr == :tokens)
/ = link_to t('layout.tokens.header'), platform_tokens_path(@platform)

View File

@ -1,31 +1,15 @@
- set_meta_tags title: [title_object(@platform), t('layout.platforms.contents')]
= render 'platforms/base/submenu'
.col-xs-12.col-md-12
h3
= t('layout.platforms.contents_of')
| &nbsp;
= @platform.name
#contents ng-controller='ContentsController'
= simple_form_for @platform, html: { 'ng-submit' => 'search()', id: 'search_contents_form' } do |f|
= f.hidden_field :name
= hidden_field_tag 'path'
= hidden_field_tag 'page'
.row
.col-md-6
= f.input :term, label: false
.col-md-6
= f.button :submit, t('layout.search.header')
hr
.text-center ng-show='processing'
= image_tag 'loading-large.gif'
.path ng-hide='processing'
ol.breadcrumb
.row
.col-xs-12.col-md-12 ng-controller='ContentsController' ng-init=('platform="'+@platform.name+'"')
rd-widget
rd-widget-header title=(t('layout.platforms.contents_of') + ' ' + @platform.name)
input.form-control.pull-right [ placeholder=t('simple_form.placeholders.platform.term') ng-model="term"
ng-model-options="{ debounce: 500 }" ng-change="search(term)" ]
rd-widget-body loading='processing' class="no-padding huge"
.path
ol.breadcrumb.no-margin
li= link_to @platform.name, '#', 'ng-click' => 'open($event, "/")'
li ng-repeat='folder in folders' ng-show='$middle'
a[ href='#' ng-click='open($event, folder.path)' ] {{folder.name}}
@ -33,9 +17,8 @@
.clearfix
- can_remove = policy(@platform).remove_file?
table.table ng-hide='processing'
table.table
tbody
tr ng-show='back'
td
a.pointer ng-click="open($event, back)" ..
@ -63,11 +46,8 @@
- if can_remove
td ng-show='content.is_folder'
td.buttons ng-hide='content.is_folder'
div ng-show='content.processing'
= t('layout.processing')
span.pointer.text-danger.glyphicon.glyphicon-remove[
confirmed-click ="destroy(content)"
ng-confirm-click=t('layout.confirm')
ng-hide ="content.processing" ]
ng-confirm-click=t('layout.confirm') ]
= angularjs_paginate
= angularjs_paginate rd_widget_footer: true

View File

@ -1,20 +1,12 @@
= render 'platforms/base/submenu'
.col-md-12
.row
.row
.col-md-12
rd-widget
rd-widget-header
- if policy(@platform.mass_builds.build).create?
a.btn.btn-primary href=new_platform_mass_build_path(@platform)
a.btn.btn-primary.pull-right href=new_platform_mass_build_path(@platform)
= t('layout.mass_builds.new')
hr
= simple_form_for @mass_build, url: platform_mass_builds_path(@platform), method: :get do |f|
.row
.col-md-6
= f.input :description, label: false
.col-md-6
= f.button :submit, t('layout.search.header')
hr
rd-widget-body class="no-padding"
table.table.table-striped
thead
tr
@ -31,5 +23,4 @@
td= mass_build.description
td= mass_build.created_at.to_s
td= link_to t('layout.show'), platform_mass_build_path(@platform, mass_build.id)
= will_paginate @mass_builds
= will_paginate @mass_builds, rd_widget_footer: true

View File

@ -1,17 +1,13 @@
- title = title_object(@mass_build)
- set_meta_tags title: title
- set_meta_tags og: { title: title,
description: truncate(@mass_build.description, length: 255) }
- set_meta_tags twitter: { title: title,
description: truncate(@mass_build.description, length: 200) }
= render 'submenu'
.col-md-12
.row
h3
= t('activerecord.models.mass_build')
.row
.col-md-4
rd-widget
rd-widget-header title=t('activerecord.models.mass_build')
rd-widget-body class="no-padding"
table.table.table-striped
tr
td
@ -97,13 +93,11 @@
- else
= t('layout.false_')
tr
td
td
tr
td
b= t('layout.mass_builds.statuses')
td
.col-md-8
rd-widget
rd-widget-header title=t('layout.mass_builds.statuses')
rd-widget-body class="no-padding"
table.table.table-striped
- MassBuild::COUNT_STATUSES.each do |status|
- path = build_lists_path+"#?#{{filter: {mass_build_id: @mass_build.id, ownership: 'everything'}.merge(status != :build_lists ? {status: BuildList.status_by_human(status)} : {})}.to_param}"
tr
@ -111,9 +105,6 @@
= link_to t("layout.build_lists.statuses.#{status}") + ": ", path
td= @mass_build.send "#{status}_count"
tr
td
td
tr
td
b= t('layout.mass_builds.lists')
@ -126,7 +117,8 @@
= link_to_list @platform, @mass_build, 'tests_failed_builds_list'
| &nbsp;
= link_to_list @platform, @mass_build, 'success_builds_list'
.buttons_block
rd-widget-footer
.buttons-block
- if policy(@mass_build).publish?
- unless @mass_build.auto_publish_status == BuildList::AUTO_PUBLISH_STATUS_DEFAULT
= link_to t('layout.mass_builds.publish_success'),
@ -134,26 +126,26 @@
method: :post,
data: { confirm: t("layout.confirm") },
class: 'btn btn-success'
hr
| &nbsp;
= link_to t('layout.mass_builds.publish_test_failed'),
publish_platform_mass_build_path(@platform, @mass_build.id, status: 'test_failed'),
method: :post,
data: { confirm: t("layout.confirm") },
class: 'btn btn-warning'
hr
| &nbsp;
- if policy(@mass_build).cancel?
= link_to t('layout.cancel'),
cancel_platform_mass_build_path(@platform, @mass_build.id),
method: :post,
class: 'btn btn-danger',
data: { confirm: t('layout.mass_builds.cancel_confirm') }
hr
| &nbsp;
- if policy(@mass_build).create?
= link_to t('layout.mass_builds.recreate'),
new_platform_mass_build_path(@platform, mass_build_id: @mass_build.id),
class: 'btn btn-primary'
| &nbsp;
- if policy(@mass_build).show_fail_reason? && @mass_build.build_error_count > 0
hr
= link_to t('layout.mass_builds.show_fail_reason_link'),
show_fail_reason_platform_mass_build_path,
class: 'btn btn-info'

View File

@ -3,12 +3,14 @@
= render 'submenu'
.col-xs-12.col-md-10.col-md-offset-1
.row
.col-md-12
rd-widget
rd-widget-header title=t('layout.mass_builds.show_fail_reason.title')
rd-widget-body
.row
h3
= t('layout.mass_builds.show_fail_reason.title')
= link_to t('layout.mass_builds.show_fail_reason.return'), platform_mass_build_path
.row
.row.top-space
-if !@items.empty?
table.table.table-condensed
thead
@ -35,5 +37,4 @@
= item[3]
-else
= t('layout.mass_builds.show_fail_reason.no_failed_builds')
.row
=will_paginate @build_lists
=will_paginate @build_lists, rd_widget_footer: true

View File

@ -26,17 +26,6 @@
- if %w(edit update).include? controller.action_name
- if policy(@platform).change_visibility?
dl.dl-horizontal
dt
= t('activerecord.attributes.platform.visibility')
dd
= link_to t("layout.platforms.change_visibility_from_#{@platform.visibility}"),
change_visibility_platform_path(@platform),
method: :post,
data: { confirm: t("layout.platforms.confirm_change_visibility") },
class: 'btn btn-xs btn-warning'
- unless @platform.personal?
h3
= t('layout.platform_arch_settings.extra_settings')
@ -60,7 +49,7 @@
input_html: { value: setting.time_living / 60 },
label: false
.col-sm-offset-3.col-sm-9
.pull-right
=> submit_button_tag
=> t('layout.or')
a.btn.btn-default href=(@platform.new_record? ? root_path : platform_path(@platform))

View File

@ -1,48 +1,15 @@
- set_meta_tags title: [title_object(@platform), t('layout.platforms.edit')]
= render 'submenu'
.container.col-md-12
.row
.col-md-12
rd-widget
rd-widget-header title=t('layout.platforms.edit')
rd-widget-body
.row
= simple_form_for @platform, wrapper_mappings: { boolean: :vertical_boolean } do |f|
= render 'form', f: f
hr
.row
- if policy(@platform).regenerate_metadata?
h4= t('layout.platforms.metadata')
table.table
tbody
tr
td= t('activerecord.attributes.regeneration_status.status')
td= t("layout.regeneration_statuses.statuses.#{@platform.human_status}")
tr
td= t('activerecord.attributes.regeneration_status.last_regenerated_at')
td= @platform.last_regenerated_at
tr
td= t('activerecord.attributes.regeneration_status.last_regenerated_status')
td= t("layout.regeneration_statuses.last_regenerated_statuses.#{@platform.human_regeneration_status}")
tr
td= t('activerecord.attributes.regeneration_status.last_regenerated_log_sha1')
td= link_to_file_store('regeneration.log', @platform.last_regenerated_log_sha1)
tr
td= t('activerecord.attributes.platform.automatic_metadata_regeneration')
td ng-controller='AutomaticMetadataRegenerationController' ng-init="platform_id = #{@platform.id}"
select ng-options='k as (v | i18n) for (k, v) in items' ng-model='amr' ng-change='update()' ng-init="amr = '#{@platform.automatic_metadata_regeneration.to_s}'"
option value=''
tr
td
td
br
= link_to t('layout.regeneration_statuses.regenerate_metadata'),
regenerate_metadata_platform_path(@platform),
method: :put,
data: { confirm: t('layout.confirm') },
class: 'btn btn-xs btn-warning'
- if policy(@platform).destroy?
hr
p

View File

@ -3,6 +3,9 @@
.col-md-6.col-md-offset-3
rd-widget
rd-widget-header title=(t('layout.platforms.list_header'))
- if policy(:platform).create?
a.btn.btn-primary.pull-right href=new_platform_path
= t('layout.platforms.new')
rd-widget-body class="no-padding"
table.table.table-hover
thead
@ -16,9 +19,3 @@
| {{item.name}}
td
| {{item.distrib_type}}
- if policy(:platform).create?
rd-widget-footer
ul.nav.nav-justified
li
a href=new_platform_path
= t('layout.platforms.new')

View File

@ -1,63 +1,53 @@
- title = title_object(@platform)
- set_meta_tags title: title
- set_meta_tags og: { title: title,
description: truncate(@platform.description, length: 255) }
- set_meta_tags twitter: { title: title,
description: truncate(@platform.description, length: 200) }
= render 'submenu'
.col-md-12
.row
.row
.col-md-6
h3
= t('layout.platforms.about')
| &nbsp;
= link_to @platform.name, platform_contents_path(@platform)
.row
.col-md-4
rd-widget
rd-widget-header title=t('layout.platforms.about')
- if policy(@platform).clone?
a.btn.btn-primary.pull-right href=clone_platform_path(@platform)
= t('layout.platforms.clone')
rd-widget-body class="no-padding"
table.table.table-condensed
tr
td
b= t('activerecord.attributes.platform.description')
.col-md-8= @platform.description
td= @platform.description
- if @platform.parent
.row
.col-md-4
tr
td
b= t('activerecord.attributes.platform.parent')
.col-md-8
td
= link_to @platform.parent.description, platform_path(@platform.parent)
.row
.col-md-4
tr
td
b= t('layout.platforms.owner')
.col-md-8= link_to @platform.owner.try(:name), url_for(@platform.owner)
td= link_to @platform.owner.try(:uname) + ' (' + @platform.owner.try(:name) + ')', url_for(@platform.owner)
.row
.col-md-4
tr
td
b= t('layout.platforms.visibility')
.col-md-8= t("layout.visibilities.#{@platform.visibility}")
td= t("layout.visibilities.#{@platform.visibility}")
.row
.col-md-4
tr
td
b= t('layout.platforms.platform_type')
.col-md-8= @platform.platform_type
td= @platform.platform_type
.row
.col-md-4
tr
td
b= t('layout.platforms.distrib_type')
.col-md-8= @platform.distrib_type
- if policy(@platform).clone?
.row
.col-md-4
.col-md-8
a.btn.btn-primary href=clone_platform_path(@platform)
= t('layout.platforms.clone')
td= @platform.distrib_type
- if @platform.platform_type == 'personal' and @platform.visibility == 'open'
.col-md-6 ng-controller='PlatformSysReposController' ng-init="init(#{@platform.id})"
h3= t('layout.platforms.sys_repos_header')
rd-widget
rd-widget-header title=t('layout.platforms.sys_repos_header')
rd-widget-body
.row
.col-md-4
b= t('layout.platforms.target_platform')

View File

@ -16,6 +16,3 @@ tr
- if policy(pbl).destroy? && pbl.can_destroy?
= link_to platform_product_product_build_list_path(platform, product, pbl), method: :delete, data: { confirm: t('layout.confirm') } do
span.glyphicon.glyphicon-remove
td
= datetime_moment pbl.updated_at

View File

@ -1,9 +1,11 @@
- set_meta_tags title: [title_object(@product), t('layout.product_build_lists.new')]
= render 'submenu'
.container.col-md-12
.row
.row
.col-md-12
rd-widget
rd-widget-header title=t('layout.product_build_lists.new')
rd-widget-body
- pbl = @product_build_list
= simple_form_for @product_build_list, url: platform_product_product_build_lists_path(@platform, @product) do |f|
= f.input :project,
@ -21,19 +23,3 @@
= f.input :time_living, input_html: { value: (pbl.time_living.to_i / 60) }
= f.button :submit, t('layout.projects.build_button')
.row
hr
h4= t('layout.product_build_lists.work_env')
pre
i
= '/home/vagrant/iso_builder - '
= t('layout.product_build_lists.iso_builder_folder')
pre
i
= '/home/vagrant/results - '
= t('layout.product_build_lists.results_folder')
pre
i
= '/home/vagrant/archives - '
= t('layout.product_build_lists.archives_folder')

View File

@ -1,8 +1,5 @@
- title = title_object(@product_build_list.product)
- set_meta_tags title: [title, t('layout.product_build_lists.show')]
- description = @product_build_list.results.map{ |r| r['file_name'] }.select{ |n| n =~ /.iso$/ } * ', '
- set_meta_tags og: { title: title, description: description }
- set_meta_tags twitter: { title: title, description: description }
= render 'submenu'
@ -10,101 +7,88 @@
- product = pbl.product
- platform = product.platform
.container.col-md-12 ng-controller='ProductBuildListController'
.row
h3
= t('layout.product_build_lists.main_data')
.row
= hidden_field_tag :product_build_list_id, pbl.id
.row ng-controller='ProductBuildListController' ng-init=("init("+pbl.id.to_s+")")
.col-md-6
b
rd-widget
rd-widget-header title=t('layout.product_build_lists.main_data')
rd-widget-body class="no-padding"
table.table.table-condensed
tr
td
= t('activerecord.attributes.product_build_list.id')
.col-md-6
td
= pbl.id
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.status')
.col-md-6
td
| {{pbl.human_status}}
- if pbl.user
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.user')
.col-md-6
td
= link_to pbl.user.try(:fullname), pbl.user
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.product')
.col-md-6
td
= link_to pbl.product.name, platform_product_path(platform, product)
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.project')
.col-md-6
td
= link_to pbl.project.name_with_owner, project_path(pbl.project)
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.project_version')
.col-md-6
td
= product_build_list_version_link(pbl, true)
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.main_script')
.col-md-6
td
= pbl.main_script
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.params')
.col-md-6
td
= pbl.params
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.time_living')
.col-md-6
td
= pbl.time_living / 60
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.autostarted')
.col-md-6
td
= t("layout.#{pbl.autostarted}_")
.row
.col-md-6
b
tr
td
= t('activerecord.attributes.product_build_list.notified_at')
.col-md-6
td
| {{pbl.notified_at}}
- if policy(pbl).update?
.row ng-show="pbl.status == #{ ProductBuildList::BUILD_COMPLETED }"
.col-md-6
b
tr ng-show="pbl.status == #{ ProductBuildList::BUILD_COMPLETED }"
td
= t('activerecord.attributes.product_build_list.not_delete')
.col-md-6
td
= select_tag 'not_delete',
options_for_select(product_build_list_delete_options),
{ ng_model: "pbl.not_delete", ng_change: 'updateStatus()'}
.row.alert.alert-danger.offset10 ng-hide='pbl.not_delete'
.row.alert.alert-danger.top-space ng-hide='pbl.not_delete != "false"'
- days = pbl.autostarted? ? ProductBuildList::LIVE_TIME : ProductBuildList::MAX_LIVE_TIME
- days = (pbl.created_at.to_date - days.ago.to_date).to_i
- if days > 1
@ -112,8 +96,8 @@
- else
= t('layout.product_build_lists.will_be_removed_today')
.row
hr
- if policy(pbl).cancel? || policy(pbl).destroy?
rd-widget-footer ng-show="pbl.can_cancel || pbl.can_destroy"
- if policy(pbl).cancel?
a.btn.btn-warning[
href=cancel_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl)
@ -130,10 +114,11 @@
data-confirm = t('layout.confirm')
ng-show = 'pbl.can_destroy' ]
= t('layout.product_build_lists.delete')
.row.offset10 ng-show="pbl.status == #{ProductBuildList::BUILD_STARTED}"
= render 'shared/log', { build_started: true, get_log_path: log_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl) }
.row
.col-md-6
= render 'shared/build_results', subject: pbl
.row ng-show="pbl.status == #{ProductBuildList::BUILD_STARTED}"
.col-md-12
= render 'shared/log', { build_started: true, get_log_path: log_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl) }

View File

@ -1,33 +1,22 @@
= f.input :name
= f.input :description, as: :text
= f.input :project_id, as: :string,
input_html: { 'data-ajax' => autocomplete_project_platform_products_path(@platform),
value: @product.project.try(:name_with_owner) }
= hidden_field_tag 'product[project_id]', @product.project_id, id: 'src_project_id'
div ng-controller="ProjectsVersionsTypeaheadController" ng-init=('init("'+@platform.name+'","'+@product.project.try(:name_with_owner).to_s+'","'+@product.project_id.to_s+'","'+@product.project_version+'")')
= f.input :project_id, as: :string,
input_html: { uib_typeahead: 'project.name for project in getProjects($viewValue)',
typeahead_wait_ms: 200,
typeahead_on_select: 'selectProject($item)',
ng_model: 'project',
typeahead_editable: 'false',
value: '{{project}}',
ng_disabled: 'loadingVersions' }
= hidden_field_tag 'product[project_id]', '', value: '{{projectId}}'
- content_for :additional_scripts do
coffee:
product_projects = []
$('#product_project_id').typeahead
val: 'data'
ajax:
url: $('#product_project_id').data('ajax')
preProcess: (data) ->
product_projects = data
onSelect: (i) ->
$('#src_project_id').val i.value
project = _.find product_projects, (p) ->
p.id.toString() == i.value
if project
$('#product_project_version').html project.project_versions
= f.input :project_version,
= f.input :project_version,
as: :grouped_select,
collection: versions_for_group_select(@product.project),
group_method: :last,
include_blank: false
include_blank: false,
input_html: { ng_disabled: 'loadingVersions', ng_bind_html: 'projectVersions' }
= f.input :main_script
= f.input :params

View File

@ -1,5 +1,4 @@
json.array!(@items) do |item|
json.id item.id
json.name item.name_with_owner
json.project_versions grouped_options_for_select(versions_for_group_select(item))
end

View File

@ -1,13 +1,11 @@
- set_meta_tags title: [title_object(@product), t('title_editing')]
= render 'submenu'
.container.col-md-12
.row
h3
= t('layout.products.edit_header')
| &nbsp;
= link_to @product.name, platform_product_path(@platform, @product)
.row
.col-md-12
rd-widget
rd-widget-header title=(t('layout.products.edit_header')+' '+@product.name)
rd-widget-body
= simple_form_for [@platform, @product] do |f|
= render 'form', f: f

View File

@ -1,15 +1,14 @@
-set_meta_tags title: [title_object(@platform), t('layout.products.list_header')]
= render 'submenu' if params[:platform_id]
.container.col-md-12
.row
.row
.col-md-8.col-md-offset-2
rd-widget
rd-widget-header title=t('layout.products.list_header')
- if policy(@platform.products.build).create?
a.btn.btn-primary href=new_platform_product_path(@platform)
a.btn.btn-primary.pull-right href=new_platform_product_path(@platform)
= t('layout.products.new')
hr
rd-widget-body class="no-padding"
= render 'list', object: @products
= will_paginate @products
= will_paginate @products, rd_widget_footer: true

View File

@ -1,8 +1,10 @@
- set_meta_tags title: [title_object(@platform), t('layout.products.new')]
= render 'submenu'
.container.col-md-12
.row
.row
.col-md-10.col-md-offset-1
rd-widget
rd-widget-header title=t('layout.products.new')
rd-widget-body
= simple_form_for [@platform, @product] do |f|
= render 'form', f: f

View File

@ -0,0 +1 @@
json.project_versions grouped_options_for_select(versions_for_group_select(@project), params[:project_version])

View File

@ -1,22 +1,17 @@
- title = title_object(@product)
- set_meta_tags title: title
- set_meta_tags og: { title: title,
description: truncate(@product.description, length: 255) }
- set_meta_tags twitter: { title: title,
description: truncate(@product.description, length: 200) }
= render 'submenu'
.container.col-md-12
.row
h3
= t('layout.products.about')
| &nbsp;
= @product.name
.row
.col-md-6
rd-widget
rd-widget-header title=(t('layout.products.about')+" "+@product.name)
- if @product.description.to_s != ""
rd-widget-body
p= @product.description
- if policy(@product).update? || policy(@product).destroy? || policy(@product.product_build_lists.build).create?
rd-widget-footer
- if policy(@product).update?
a.btn.btn-primary href=edit_platform_product_path(@platform, @product)
= t('layout.edit')
@ -30,11 +25,10 @@
- if policy(@product.product_build_lists.build).create?
a.btn.btn-primary href=new_platform_product_product_build_list_path(@platform, @product)
= t('layout.products.build')
hr
h3= t("layout.products.build_lists_monitoring")
.col-md-6
rd-widget
rd-widget-header title=t("layout.products.build_lists_monitoring")
rd-widget-body class="no-padding"
table.table.table-striped
thead
tr
@ -42,8 +36,7 @@
th= t("activerecord.attributes.product_build_list.status")
th= t("activerecord.attributes.product_build_list.product")
th= t("layout.product_build_lists.action")
th= t("activerecord.attributes.product_build_list.notified_at")
tbody
= render partial: 'platforms/product_build_lists/product_build_list',
collection: @product_build_lists
= will_paginate @product_build_lists
= will_paginate @product_build_lists, rd_widget_footer: true

View File

@ -1,30 +1,20 @@
div ng-controller='RepositoryProjectsController'
= simple_form_for :project,
html: { ng_submit: 'search()',
id: 'search_projects_form',
class: 'well' } do |f|
= hidden_field_tag :added, controller.action_name.to_sym == :show
= hidden_field_tag :repository_id, @repository.id
= hidden_field_tag :platform_id, @repository.platform_id
= hidden_field_tag :page
.row
.col-md-5
= f.input :owner, label: false
.col-md-5
= f.input :name, label: false
.col-md-2
= f.button :submit, t('layout.search.header')
div ng-controller='RepositoryProjectsController' ng-init=("init("+(controller.action_name.to_sym == :show).to_s+","+repository.id.to_s+","+repository.platform_id.to_s+")")
rd-widget
rd-widget-header title=t("layout.projects.list_header") custom-class="col-sm-8"
.col-md-6
input [ ng-model="search_owner" ng-change="search(search_owner, search_name)" class="form-control"
placeholder=t("simple_form.placeholders.project.owner") ng-model-options="{ debounce: 500 }" ]
.col-md-6
input [ ng-model="search_name" ng-change="search(search_owner, search_name)" class="form-control"
placeholder=t("simple_form.placeholders.project.name") ng-model-options="{ debounce: 500 }"]
rd-widget-body class="no-padding" loading="processing"
table.table.table-striped
thead
tr
th= t("activerecord.attributes.project.name")
th= t("activerecord.attributes.project.description")
th
tbody ng-hide='processing'
tr ng-repeat='project in projects' ng-cloak = true
td
i.fa ng-class='project.visibility_class'
| &nbsp;
@ -38,5 +28,5 @@ div ng-controller='RepositoryProjectsController'
ng-click = 'removeProject(project)']
span.glyphicon.glyphicon-remove
| &nbsp;
rd-widget-footer ng-show="total_items > 20"
= angularjs_paginate

View File

@ -1,24 +1,19 @@
-set_meta_tags title: [title_object(@repository), t('layout.repositories.edit')]
= render 'submenu'
.container.col-md-offset-2.col-md-8
.row
h3
= t("layout.repositories.about")
| &nbsp;
i
= @repository.name
.row
.row
.col-md-6
rd-widget
rd-widget-header title=(t("layout.repositories.about") + " " + @repository.name)
rd-widget-body
= simple_form_for @repository, url: platform_repository_path(@platform, @repository) do |f|
= render "form", f: f
hr
- if policy(@repository).update?
.row
h3= t('layout.repositories.extra_actions')
.col-md-6
rd-widget
rd-widget-header title=t('layout.repositories.extra_actions')
rd-widget-body
- if @platform.main?
.row
- if @repository.sync_lock_file_exists?
@ -44,8 +39,7 @@
= f.button :submit, t('layout.repositories.regenerate_metadata'), data: { confirm: t('layout.confirm') }, class: 'btn-warning'
- if @repository.repository_statuses.present?
.row
hr
.row.top-space
table.table.table-striped
thead
tr
@ -64,10 +58,9 @@
td= status.last_regenerated_at
- unless @platform.main?
td= status.platform.name
hr
.row
- if @platform.main?
- if @platform.main?
.row.top-space
.col-md-12
= render "shared/members_table",
remove_members_path: remove_members_platform_repository_path(@platform, @repository),
add_member_path: add_member_platform_repository_path(@platform, @repository),

View File

@ -1,20 +1,14 @@
- title = title_object(@platform)
- set_meta_tags title: [title, t('layout.repositories.list_header')]
- title = t('layout.repositories.list_header') + ' - ' + title
- set_meta_tags og: { title: title,
description: truncate(@platform.description, length: 255) }
- set_meta_tags twitter: { title: title,
description: truncate(@platform.description, length: 200) }
= render 'submenu' if params[:platform_id]
.container.col-md-12
- if policy(@platform.repositories.build).create?
.row
a.btn.btn-primary href=new_platform_repository_path(@platform)
.row
.col-md-6.col-md-offset-3
rd-widget
rd-widget-header title=t('layout.repositories.list_header')
-if policy(@platform.repositories.build).create?
a.btn.btn-primary.pull-right href=new_platform_repository_path(@platform)
= t("layout.repositories.new")
hr
.row
rd-widget-body class="no-padding"
= render 'list', object: @repositories
= will_paginate @repositories

View File

@ -0,0 +1,20 @@
= render 'submenu'
.row
.col-md-4
.row
rd-widget
rd-widget-header title=(t("layout.repositories.add_projects_to") + ' ' + @repository.name)
rd-widget-body
= simple_form_for :repository, url: add_project_platform_repository_path(@platform, @repository), html: { method: :put } do |f|
= f.input :projects_list, as: :text
= f.button :submit, t('layout.add')
.row.top-space
rd-widget
rd-widget-header title=(t("layout.repositories.remove_projects_from") + ' ' + @repository.name)
rd-widget-body
= simple_form_for :repository, url: remove_project_platform_repository_path(@platform, @repository), html: { method: :delete } do |f|
= f.input :projects_list, as: :text
= f.button :submit, t('layout.delete'), class: 'btn-danger'
.col-md-8
= render 'proj_list', object: @projects, repository: @repository

View File

@ -1,9 +1,10 @@
-set_meta_tags title: [title_object(@platform), t('layout.repositories.new')]
= render 'submenu'
.row
.container.col-md-offset-2.col-md-8
h3
= t("layout.repositories.new_header")
.row
.col-md-offset-2.col-md-8
rd-widget
rd-widget-header title=t("layout.repositories.new_header")
rd-widget-body
= simple_form_for @repository, url: platform_repositories_path(@platform) do |f|
= render 'form', f: f

View File

@ -1,13 +0,0 @@
= render 'submenu'
.container.col-md-offset-2.col-md-8
h3= raw "#{t("layout.repositories.add_projects_to")}: #{link_to @repository.name, platform_repository_path(@platform, @repository)}"
.row
= simple_form_for :repository, url: add_project_platform_repository_path(@platform, @repository), html: { method: :put } do |f|
= f.input :projects_list, as: :text
= f.button :submit, t('layout.add')
hr
.row
= render 'proj_list', object: @projects

View File

@ -1,10 +0,0 @@
= render 'submenu'
/ = render 'sidebar'
.container.col-md-offset-2.col-md-8
h3= raw "#{t("layout.repositories.remove_projects_from")}: #{link_to @repository.name, platform_repository_path(@platform, @repository)}"
.row
= simple_form_for :repository, url: remove_project_platform_repository_path(@platform, @repository), html: { method: :delete } do |f|
= f.input :projects_list, as: :text
= f.button :submit, t('layout.delete'), class: 'btn-danger'

View File

@ -1,37 +1,25 @@
- title = title_object(@repository)
- set_meta_tags title: title
- set_meta_tags og: { title: title,
description: truncate(@repository.description, length: 255) }
- set_meta_tags twitter: { title: title,
description: truncate(@repository.description, length: 200) }
= render 'submenu'
.container.col-md-12
.row
h3
= t("layout.repositories.about")
| &nbsp;
i
= @repository.name
.row
.col-md-9
= render 'proj_list', repository: @repository
.col-md-3
rd-widget
rd-widget-header title=(t("layout.repositories.about") + " " + @repository.name)
rd-widget-body
p= @repository.description
.row
- if policy(@repository).update? || policy(@repository).destroy? || policy(@repository).remove_project? || policy(@repository).add_project?
rd-widget-footer
- if policy(@repository).update?
a.btn.btn-primary href=edit_platform_repository_path(@platform, @repository)
= t("layout.edit")
| &nbsp;
- if policy(@repository).manage_projects?
a.btn.btn-primary href=manage_projects_platform_repository_path(@platform, @repository)
= t('layout.projects.manage_projects')
| &nbsp;
- if policy(@repository).destroy?
= link_to t('layout.delete'), platform_repository_path(@platform, @repository), method: 'delete', class: 'btn btn-danger', data: { confirm: t("layout.repositories.confirm_delete") }
.row
hr
h3= t("layout.projects.list_header")
- if policy(@repository).add_project?
a.btn.btn-primary href=add_project_platform_repository_path(@platform, @repository)
= t('layout.projects.add')
| &nbsp;
- if policy(@repository).remove_project?
a.btn.btn-primary href=remove_project_platform_repository_path(@platform, @repository)
= t('layout.repositories.mass_delete')
.row
hr
= render 'proj_list'

View File

@ -1,32 +1,31 @@
- if policy(build_list).cancel?
.row
.row ng-show='build_list.can_cancel'
= link_to t("layout.build_lists.cancel"),
cancel_build_list_path(build_list),
method: :put,
data: { confirm: t('layout.confirm') },
class: 'btn btn-primary',
'ng-show' => 'build_list.can_cancel'
class: 'btn btn-primary'
.row.top-space ng-show="build_list.can_publish && build_list.status == #{BuildList::BUILD_PUBLISHED}"
.row ng-show="build_list.can_publish && build_list.status == #{BuildList::BUILD_PUBLISHED}"
= submit_tag t('layout.publish_again'),
data: { confirm: t("layout.publish_again_warning") },
name: 'publish',
class: 'btn btn-primary'
.row.top-space ng-show="build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status == #{BuildList::TESTS_FAILED}"
.row ng-show="build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status == #{BuildList::TESTS_FAILED}"
= submit_tag t('layout.publish'),
data: { confirm: t('layout.build_lists.tests_failed') },
name: 'publish',
class: 'btn btn-primary'
.row.top-space ng-show="build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status != #{BuildList::TESTS_FAILED} && build_list.status != #{BuildList::BUILD_PUBLISHED}"
.row ng-show="build_list.can_publish && build_list.can_publish_in_future && build_list.extra_build_lists_published && build_list.status != #{BuildList::TESTS_FAILED} && build_list.status != #{BuildList::BUILD_PUBLISHED}"
= submit_tag t('layout.publish'),
data: { confirm: t('layout.confirm') },
name: 'publish',
class: 'btn btn-primary'
.row.top-space ng-show='build_list.can_publish_into_testing'
.row ng-show='build_list.can_publish_into_testing'
= link_to t('layout.publish_into_testing'),
publish_into_testing_build_list_path(build_list),
method: :put,
@ -34,7 +33,7 @@
class: 'btn btn-primary'
- if policy(build_list).reject_publish?
.row.top-space ng-show='build_list.can_reject_publish'
.row ng-show='build_list.can_reject_publish'
= link_to t('layout.reject_publish'),
reject_publish_build_list_path(build_list),
method: :put,
@ -42,7 +41,7 @@
class: 'btn btn-primary'
- if policy(build_list).rerun_tests?
.row.top-space ng-show="build_list.status == #{BuildList::TESTS_FAILED} || build_list.status == #{BuildList::SUCCESS}"
.row ng-show="build_list.status == #{BuildList::TESTS_FAILED} || build_list.status == #{BuildList::SUCCESS}"
= link_to t('layout.build_lists.rerun_tests'),
rerun_tests_build_list_path(build_list),
method: :put,
@ -50,7 +49,7 @@
class: 'btn btn-primary'
- if policy(build_list).create_container?
.row.top-space ng-show='build_list.can_create_container'
.row ng-show='build_list.can_create_container'
= link_to t('layout.build_lists.create_container'),
create_container_build_list_path(build_list),
method: :put,
@ -58,13 +57,13 @@
class: 'btn btn-primary'
- if policy(build_list).create?
.row.top-space
.row
= link_to t('layout.build_lists.recreate_build_list'), new_project_build_list_path(build_list.project,
build_list_id: build_list.id),
class: 'btn btn-primary'
- if can_run_dependent_build_lists?(build_list)
.row.top-space ng-show='build_list.dependent_projects_exists'
.row ng-show='build_list.dependent_projects_exists'
= link_to t('projects.build_lists.dependent_projects.title'),
dependent_projects_build_list_path(build_list),
class: 'btn btn-primary'

View File

@ -3,7 +3,7 @@
== render 'projects/build_lists/filter'
rd-widget
rd-widget-header title="Build Lists {{::widgetTitle}}" icon="fa-gears"
.form-inline ng-init="autoreload=true"
.form-inline.pull-right ng-init="autoreload=true"
button ng-model="autoreload" ng-click="setAutoreload(autoreload)" class="btn btn-default" uib-btn-checkbox=""
= t 'layout.autoreload_page'
button class="btn btn-default" ng-click="openFilters()" ng-disabled="isRequest"

View File

@ -22,6 +22,7 @@ div[ ng-controller='BuildListController'
= render 'shared/build_results', subject: @build_list
.row.top-space ng-show="build_list.status == #{BuildList::BUILD_STARTED}"
.col-md-12
= render 'shared/log', { build_started: true, get_log_path: log_build_list_path(@build_list) }
.row.top-space
@ -189,4 +190,5 @@ div[ ng-controller='BuildListController'
rd-widget-header title="Actions"
rd-widget-body
= form_for @build_list, url: publish_build_list_path(@build_list), html: {class: :"form-inline"} do |f|
.buttons-block
= render 'buttons', build_list: @build_list

View File

@ -1,11 +1,11 @@
.row.top-space
.col-md-6
.col-md-6.col-md-offset-3
rd-widget
div ng-controller="ProjectsController"
rd-widget-header title=(t "dashboard.projects.title") icon="fa-cube"
input.form-control.input-sm [ng-model="search" placeholder=(t "dashboard.projects.search")
ng-change="searchProjects(search)" ng-model-options="{ debounce: 500 }"]
rd-widget-body classes="medium no-padding" loading="requesting"
rd-widget-body classes="no-padding" loading="requesting"
.table-responsive
table.table ng-cloak=true
thead

View File

@ -1,10 +1,3 @@
h4
- if project.public?
i.fa.fa-unlock-alt.text-success>
- else
i.fa.fa-lock.text-danger>
a href=project_path(project)
= project.name_with_owner
.help-block
=> t('.updated')
= time_ago_in_words(project.updated_at)

View File

@ -1,24 +1,10 @@
.row
.col-md-3.col-md-offset-1
h3
= t('.advanced')
.col-md-7.offset10
= simple_form_for @search, url: search_index_path, method: :get do |f|
.row.top-space
.col-md-10.col-md-offset-1
rd-widget
rd-widget-header title=t('layout.search.header')
rd-widget-body
.row
.col-md-6
=hidden_field_tag :type, @type
= f.input :query, label: false, input_html: { name: 'query' }
.col-md-6
= f.button :submit, t('.submit')
| &nbsp;
= t('layout.or')
| &nbsp;
a href=search_index_path
= t('layout.clear')
.row
.col-md-3.col-md-offset-1
.col-md-3
.panel.panel-default
.panel-body
ul.nav.nav-pills.nav-stacked
@ -30,13 +16,10 @@
= v
.col-md-7
.col-md-9
table.table.table-striped
thead
tr
th
tbody
- @collection.each do |c|
tr
td= render @type.singularize, @type.singularize.to_sym => c
= will_paginate @collection
= will_paginate @collection, rd_widget_footer: true

View File

@ -2,7 +2,19 @@
/ $scope.goToPage = (number) ->
/ $location.search('page', number)
uib-pagination[ boundary-links = 'true'
- if rd_widget_footer
rd-widget-footer ng-show = "#{total_items} > #{per_page}"
uib-pagination[ boundary-links = 'true'
total-items = total_items
ng-model = page
previous-text = "" next-text = ""
first-text = "«" last-text = "»"
items-per-page = per_page
max-size = 5
rotate = 'false'
ng-change = select_page ]
- else
uib-pagination[ boundary-links = 'true'
total-items = total_items
ng-model = page
previous-text = "" next-text = ""

View File

@ -1,5 +1,8 @@
- update_roles_path ||= false
= form_tag remove_members_path, id: 'members_form', method: :delete do
rd-widget
rd-widget-header title=t("layout.collaborators.members")
rd-widget-body
= form_tag remove_members_path, id: 'members_form', method: :delete do
table.table.table-striped
thead
tr
@ -55,19 +58,18 @@
- if policy(editable_object).remove_members?
= submit_tag t('layout.delete'), class: 'btn btn-danger', data: {'disable-with' => t('layout.processing')}
- if policy(editable_object).add_member?
hr
- if policy(editable_object).add_member?
rd-widget-footer
= simple_form_for :user, url: add_member_path,
html: { class: 'form-inline' },
html: { class: 'form-inline', ng_controller:"MembersController" },
wrapper: :inline_form do |f|
= hidden_field_tag 'member_id', nil, id: 'member_id_field'
= hidden_field_tag 'member_id', nil, value: '{{memberId}}'
- autocomplete_path ||= autocomplete_user_uname_autocompletes_path
= f.input :uname,
input_html: { 'data-ajax' => autocomplete_path,
'data-id' => '#member_id_field',
class: 'typeahead' }
input_html: { uib_typeahead: 'user.name for user in getUsers($viewValue)',
typeahead_on_select: 'select($item, $model, $label)',
ng_model: 'member' }
- if update_roles_path
| &nbsp;

View File

@ -1,7 +1,7 @@
- set_meta_tags title: t('.header')
.row.top-space
.col-md-8.col-md-offset-2
.col-md-12
rd-widget
rd-widget-header title=t('.header')
rd-widget-body

View File

@ -1,65 +1,12 @@
= simple_form_for :project, html: { 'ng-submit' => 'search()', id: 'search_projects_form' } do |f|
= hidden_field_tag 'subject_uname', subject.uname
.row
- if current_user
.col-md-2
.btn-group ng-cloak = true
button.btn.btn-default.dropdown-toggle[ type="button"
id="dropdownVisibility"
aria-expanded="false"
data-toggle="dropdown" ]
span> ng-show="visibility == 'all'"
= t('.visibilities.all')
span> ng-show="visibility == 'open'"
i.fa.fa-unlock-alt.text-success>
= t('.visibilities.open')
span> ng-show="visibility == 'hidden'"
i.fa.fa-lock.text-danger>
= t('.visibilities.hidden')
span.caret
ul.dropdown-menu role="menu"
li role="presentation"
a.btn-link.pointer role="menuitem" tabindex="-1" ng-click="visibility = 'all'"
= t('.visibilities.all')
li role="presentation"
a.btn-link.pointer role="menuitem" tabindex="-1" ng-click="visibility = 'open'"
i.fa.fa-unlock-alt.text-success>
= t('.visibilities.open')
li role="presentation"
a.btn-link.pointer role="menuitem" tabindex="-1" ng-click="visibility = 'hidden'"
i.fa.fa-lock.text-danger>
= t('.visibilities.hidden')
.col-md-5
= f.input :name,
label: false,
input_html: { ng_model: 'term' }
.col-md-5
=> f.button :submit, t('.search')
=> t('.or')
= link_to t('.clear'), subject, class: 'btn btn-default'
hr
table.table.table-striped ng-show='!processing'
thead
tr
th
div ng-controller='ProfileController' ng-init=('init("'+subject.uname+'")')
rd-widget
rd-widget-header title=t('top_menu.projects')
input.form-control [placeholder=t("simple_form.placeholders.project.name") ng-model="project_name" ng-change="search(project_name)" ng-model-options="{debounce: 500}" ng-disabled="total_items == 0 && !term"]
rd-widget-body class="no-padding" loading="processing"
table.table.table-striped
tbody
tr ng-repeat='project in projects'
td
h4
i.fa.fa-unlock-alt.text-success> ng-if='project.public'
i.fa.fa-lock.text-danger> ng-if='!project.public'
a ng-href='{{project.path}}'
| {{project.name}}
.help-block title = '{{project.updated_at_utc}}'
=> t('.updated')
| {{project.updated_at | amDateFormat:'YYYY-MM-DD HH:mm'}} (
span am-time-ago = 'project.updated_at'
| )
= angularjs_paginate
= angularjs_paginate rd_widget_footer: true

View File

@ -4,12 +4,13 @@
.row
.col-md-3.col-md-offset-1
rd-widget
- title=@user.uname.truncate(20) + (@user.name.present? ? ' (' + @user.name.truncate(20) + ')' : '')
rd-widget-header title=title
rd-widget-body
- size = User::AVATAR_SIZES[:big]
= image_tag avatar_url(@user, :big),
alt: @user.uname, height: size, width: size
- if @user.name.present?
h2= @user.name.truncate(20)
h3.help-block= @user.uname.truncate(20)
hr
- if @user.professional_experience.present?
@ -53,11 +54,14 @@
a href="#"
= t('top_menu.statistics')
.offset10 ng-show="tab == 'projects'" ng-controller='ProfileController' ng-cloak = true
div ng-show="tab == 'projects'"
= render 'projects', subject: @user
#manage-statistics.offset10[ ng-show = "tab == 'statistics'"
ng-controller = 'StatisticsController'
ng-cloak = true ]
rd-widget
rd-widget-header title=t('top_menu.statistics')
rd-widget-body
= render 'statistics'

View File

@ -53,8 +53,8 @@ common: &common
development:
<<: *common
root_path: /var/rosa
git_path: /var/rosa
root_path: /share
git_path: /share
tmpfs_path: /dev/shm
do-not-reply-email: do-not-reply@localhost
github_services:

View File

@ -25,6 +25,7 @@ en:
clear_warning: Attention! Cleared packages cannot be restored!
regenerate_metadata: Regenerate metadata
mass_delete: Mass delete
manage_projects: Manage projects
personal_repositories:
settings_header: Settings

View File

@ -169,9 +169,8 @@ Rails.application.routes.draw do
resources :repositories do
member do
get :add_project
get :manage_projects
put :add_project
get :remove_project
delete :remove_project
get :projects_list
delete :remove_members
@ -193,7 +192,10 @@ Rails.application.routes.draw do
put :cancel
}
end
collection { get :autocomplete_project }
collection {
get :autocomplete_project
get :project_versions
}
end
resources :maintainers, only: [:index]
end

View File

@ -13,7 +13,12 @@ class BootstrapLinkRenderer < WillPaginate::ActionView::LinkRenderer
end
end.join(@options[:link_separator])
tag("ul", list_items, class: ul_class)
res = tag("ul", list_items, class: ul_class)
if @options[:rd_widget_footer]
tag("rd-widget-footer", res)
else
res
end
end
def container_attributes