Continuing work on the new interface
This commit is contained in:
parent
87f510858b
commit
eb37a63d3a
|
@ -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;
|
||||
}
|
||||
}]);
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
]
|
33
app/assets/javascripts/angularjs/controllers/projects_versions_typeahead_controller.js
vendored
Normal file
33
app/assets/javascripts/angularjs/controllers/projects_versions_typeahead_controller.js
vendored
Normal 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;
|
||||
});
|
||||
}
|
||||
}]);
|
|
@ -8,7 +8,6 @@ angular
|
|||
|
||||
function rdWidgetFooter() {
|
||||
var directive = {
|
||||
requires: '^rdWidget',
|
||||
transclude: true,
|
||||
replace: true,
|
||||
template: '<div class="widget-footer" ng-transclude></div>',
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,63 +1,63 @@
|
|||
RosaABF.controller 'RepositoryProjectsController', ['$scope', '$http', '$location', 'confirmMessage', ($scope, $http, $location, confirmMessage) ->
|
||||
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
|
||||
|
||||
$scope.added = $('#added').val()
|
||||
$scope.platform_id = $('#platform_id').val()
|
||||
$scope.repository_id = $('#repository_id').val()
|
||||
$scope.processing = true
|
||||
$scope.projects = []
|
||||
$scope.total_items = null
|
||||
$scope.init = (added, repository_id, platform_id) ->
|
||||
$scope.added = added
|
||||
$scope.platform_id = platform_id
|
||||
$scope.repository_id = repository_id
|
||||
$scope.refresh()
|
||||
true
|
||||
|
||||
# Fixes: redirect to page after form submit
|
||||
$("#search_projects_form").on 'submit', ->
|
||||
false
|
||||
$scope.refresh = ->
|
||||
$scope.processing = true
|
||||
|
||||
$scope.refresh = ->
|
||||
$scope.processing = true
|
||||
params =
|
||||
added: $scope.added
|
||||
owner_name: $scope.owner_name
|
||||
project_name: $scope.project_name
|
||||
page: $scope.page
|
||||
sSortDir_0: 'asc'
|
||||
format: 'json'
|
||||
|
||||
params =
|
||||
added: $scope.added
|
||||
owner_name: $('#project_owner').val()
|
||||
project_name: $('#project_name').val()
|
||||
page: $('#page').val()
|
||||
format: 'json'
|
||||
path = Routes.projects_list_platform_repository_path $scope.platform_id, $scope.repository_id
|
||||
$http.get(path, params: params).success (data) ->
|
||||
$scope.projects = data.projects
|
||||
$scope.total_items = data.total_items
|
||||
$scope.processing = false
|
||||
.error ->
|
||||
$scope.projects = []
|
||||
$scope.processing = false
|
||||
|
||||
path = Routes.projects_list_platform_repository_path $scope.platform_id, $scope.repository_id
|
||||
$http.get(path, params: params).success (data) ->
|
||||
$scope.projects = data.projects
|
||||
$scope.total_items = data.total_items
|
||||
$scope.processing = false
|
||||
.error ->
|
||||
$scope.projects = []
|
||||
$scope.processing = false
|
||||
true
|
||||
|
||||
true
|
||||
$scope.search = (owner, name) ->
|
||||
$scope.owner_name = owner
|
||||
$scope.project_name = name
|
||||
$scope.refresh()
|
||||
true
|
||||
|
||||
$scope.search = ->
|
||||
params =
|
||||
owner_name: $('#project_owner').val()
|
||||
project_name: $('#project_name').val()
|
||||
$location.search(params)
|
||||
$scope.goToPage = (number) ->
|
||||
$scope.page = number
|
||||
$scope.refresh()
|
||||
true
|
||||
|
||||
$scope.$on '$locationChangeSuccess', (event) ->
|
||||
$scope.updateParams()
|
||||
$scope.refresh()
|
||||
$scope.removeProject = (project) ->
|
||||
return false unless confirmMessage.show()
|
||||
$http.delete(project.remove_path).success (data) ->
|
||||
$.notify(data.message, 'success')
|
||||
|
||||
$scope.updateParams = ->
|
||||
params = $location.search()
|
||||
$('#project_owner').val(params['owner_name'])
|
||||
$('#project_name').val(params['project_name'])
|
||||
$('#page').val(params['page'])
|
||||
$scope.projects = _.reject($scope.projects, (pr) ->
|
||||
return pr.id is project.id
|
||||
)
|
||||
false
|
||||
|
||||
$scope.goToPage = (number) ->
|
||||
$location.search('page', number)
|
||||
|
||||
$scope.removeProject = (project) ->
|
||||
return false unless confirmMessage.show()
|
||||
$http.delete(project.remove_path).success (data) ->
|
||||
$.notify(data.message, 'success')
|
||||
|
||||
$scope.projects = _.reject($scope.projects, (pr) ->
|
||||
return pr.id is project.id
|
||||
)
|
||||
false
|
||||
return
|
||||
]
|
|
@ -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;
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -215,11 +215,11 @@ class Platform < ActiveRecord::Base
|
|||
|
||||
def symlink_directory
|
||||
# umount_directory_for_rsync # TODO ignore errors
|
||||
system("ln -s #{path} #{symlink_path}")
|
||||
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) }
|
||||
end
|
||||
#system("ln -s #{path} #{symlink_path}")
|
||||
#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) }
|
||||
#end
|
||||
end
|
||||
later :symlink_directory, queue: :middle
|
||||
|
||||
|
|
|
@ -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?
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -2,24 +2,26 @@
|
|||
|
||||
= render 'groups/base/submenu'
|
||||
|
||||
.container.col-md-offset-2.col-md-8
|
||||
.row
|
||||
= simple_form_for @group,
|
||||
html: { class: 'form-horizontal' },
|
||||
url: profile_group_path(@group),
|
||||
wrapper: :horizontal_form,
|
||||
wrapper_mappings: { boolean: :horizontal_boolean,
|
||||
file: :horizontal_file_input } do |f|
|
||||
.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),
|
||||
wrapper: :horizontal_form,
|
||||
wrapper_mappings: { boolean: :horizontal_boolean,
|
||||
file: :horizontal_file_input } do |f|
|
||||
|
||||
= render 'form', f: f
|
||||
= render 'form', f: f
|
||||
|
||||
- if policy(@group).destroy?
|
||||
.row
|
||||
hr
|
||||
.alert.alert-danger
|
||||
= t('layout.groups.delete_warning')
|
||||
= link_to t('layout.delete'),
|
||||
profile_group_path(@group),
|
||||
method: :delete,
|
||||
data: { confirm: t("layout.groups.confirm_delete") },
|
||||
class: 'btn btn-danger'
|
||||
- if policy(@group).destroy?
|
||||
.row.top-space
|
||||
.alert.alert-danger
|
||||
= t('layout.groups.delete_warning')
|
||||
= link_to t('layout.delete'),
|
||||
profile_group_path(@group),
|
||||
method: :delete,
|
||||
data: { confirm: t("layout.groups.confirm_delete") },
|
||||
class: 'btn btn-danger'
|
|
@ -1,19 +1,22 @@
|
|||
-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
|
||||
%thead
|
||||
%tr
|
||||
%th= t 'layout.groups.group'
|
||||
%th= t 'layout.groups.description'
|
||||
%th.col-sm-1= t 'layout.groups.leave_group'
|
||||
%tbody
|
||||
- @groups.each do |group|
|
||||
%tr
|
||||
%td= link_to group.name, group_path(group)
|
||||
%td= group.description
|
||||
%td
|
||||
- if group.owner_id != current_user.id
|
||||
= link_to remove_user_group_path(group), method: :delete do
|
||||
%span.fa.fa-lg.fa-times.text-danger
|
||||
.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= t 'layout.groups.leave_group'
|
||||
%tbody
|
||||
- @groups.each do |group|
|
||||
%tr
|
||||
%td= link_to group.name, group_path(group)
|
||||
%td= group.description
|
||||
%td
|
||||
- if group.owner_id != current_user.id
|
||||
= link_to remove_user_group_path(group), method: :delete do
|
||||
%span.fa.fa-lg.fa-times.text-danger
|
||||
|
|
|
@ -1,35 +1,30 @@
|
|||
- 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
|
||||
- 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')
|
||||
p
|
||||
= @group.description
|
||||
hr
|
||||
.row
|
||||
.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-10
|
||||
p
|
||||
= @group.description
|
||||
.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
|
||||
- size = User::AVATAR_SIZES[:micro]
|
||||
- @members.each do |member|
|
||||
p
|
||||
=> image_tag avatar_url(member, :micro), alt: member.uname, height: size, width: size
|
||||
= link_to member.uname.truncate(20), member
|
||||
rd-widget
|
||||
rd-widget-header title=t('layout.collaborators.members')
|
||||
rd-widget-body
|
||||
- size = User::AVATAR_SIZES[:micro]
|
||||
- @members.each do |member|
|
||||
p
|
||||
=> image_tag avatar_url(member, :micro), alt: member.uname, height: size, width: size
|
||||
= link_to member.uname.truncate(20), member
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,73 +1,53 @@
|
|||
- 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')
|
||||
|
|
||||
= @platform.name
|
||||
.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}}
|
||||
li.active[ ng-repeat='fold in folders' ng-show='$last && !$first' ] {{fold.name}}
|
||||
.clearfix
|
||||
|
||||
#contents ng-controller='ContentsController'
|
||||
- can_remove = policy(@platform).remove_file?
|
||||
table.table
|
||||
tbody
|
||||
tr ng-show='back'
|
||||
td
|
||||
a.pointer ng-click="open($event, back)" ..
|
||||
td
|
||||
td
|
||||
- if can_remove
|
||||
td
|
||||
|
||||
= 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'
|
||||
tr ng-repeat='content in contents'
|
||||
td ng-show='content.is_folder'
|
||||
span.glyphicon.glyphicon-folder-close
|
||||
|
|
||||
span
|
||||
a.pointer.files-see ng-click="open($event, content)" {{content.name}}
|
||||
td ng-hide='content.is_folder'
|
||||
span.glyphicon.glyphicon-file
|
||||
|
|
||||
span
|
||||
a.pointer.files-see ng-href='{{content.download_url}}' {{content.name}}
|
||||
td
|
||||
a.pointer ng-href='{{content.build_list.url}}' ng-show='content.build_list'
|
||||
= t('activerecord.models.build_list')
|
||||
td
|
||||
| {{content.size}}
|
||||
- if can_remove
|
||||
td ng-show='content.is_folder'
|
||||
td.buttons ng-hide='content.is_folder'
|
||||
span.pointer.text-danger.glyphicon.glyphicon-remove[
|
||||
confirmed-click ="destroy(content)"
|
||||
ng-confirm-click=t('layout.confirm') ]
|
||||
|
||||
.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
|
||||
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}}
|
||||
li.active[ ng-repeat='fold in folders' ng-show='$last && !$first' ] {{fold.name}}
|
||||
.clearfix
|
||||
|
||||
- can_remove = policy(@platform).remove_file?
|
||||
table.table ng-hide='processing'
|
||||
tbody
|
||||
|
||||
tr ng-show='back'
|
||||
td
|
||||
a.pointer ng-click="open($event, back)" ..
|
||||
td
|
||||
td
|
||||
- if can_remove
|
||||
td
|
||||
|
||||
tr ng-repeat='content in contents'
|
||||
td ng-show='content.is_folder'
|
||||
span.glyphicon.glyphicon-folder-close
|
||||
|
|
||||
span
|
||||
a.pointer.files-see ng-click="open($event, content)" {{content.name}}
|
||||
td ng-hide='content.is_folder'
|
||||
span.glyphicon.glyphicon-file
|
||||
|
|
||||
span
|
||||
a.pointer.files-see ng-href='{{content.download_url}}' {{content.name}}
|
||||
td
|
||||
a.pointer ng-href='{{content.build_list.url}}' ng-show='content.build_list'
|
||||
= t('activerecord.models.build_list')
|
||||
td
|
||||
| {{content.size}}
|
||||
- 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" ]
|
||||
|
||||
= angularjs_paginate
|
||||
= angularjs_paginate rd_widget_footer: true
|
||||
|
|
|
@ -1,35 +1,26 @@
|
|||
= render 'platforms/base/submenu'
|
||||
|
||||
.col-md-12
|
||||
.row
|
||||
- if policy(@platform.mass_builds.build).create?
|
||||
a.btn.btn-primary 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
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= t('activerecord.attributes.mass_build.id')
|
||||
th= t('activerecord.attributes.mass_build.name')
|
||||
th= t('activerecord.attributes.mass_build.description')
|
||||
th= t('activerecord.attributes.mass_build.created_at')
|
||||
th
|
||||
tbody
|
||||
- @mass_builds.each do |mass_build|
|
||||
tr
|
||||
td= mass_build.id
|
||||
td= link_to_mass_build(mass_build)
|
||||
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
|
||||
.row
|
||||
.col-md-12
|
||||
rd-widget
|
||||
rd-widget-header
|
||||
- if policy(@platform.mass_builds.build).create?
|
||||
a.btn.btn-primary.pull-right href=new_platform_mass_build_path(@platform)
|
||||
= t('layout.mass_builds.new')
|
||||
rd-widget-body class="no-padding"
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= t('activerecord.attributes.mass_build.id')
|
||||
th= t('activerecord.attributes.mass_build.name')
|
||||
th= t('activerecord.attributes.mass_build.description')
|
||||
th= t('activerecord.attributes.mass_build.created_at')
|
||||
th
|
||||
tbody
|
||||
- @mass_builds.each do |mass_build|
|
||||
tr
|
||||
td= mass_build.id
|
||||
td= link_to_mass_build(mass_build)
|
||||
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, rd_widget_footer: true
|
||||
|
|
|
@ -1,159 +1,151 @@
|
|||
- 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
|
||||
b= t('activerecord.attributes.mass_build.name')
|
||||
td= link_to_mass_build(@mass_build)
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.id')
|
||||
td= @mass_build.id
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.arch_names')
|
||||
td= @mass_build.arch_names
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.build_for_platform')
|
||||
td= link_to @mass_build.build_for_platform.name, platform_path(@mass_build.build_for_platform)
|
||||
- if @mass_build.external_nodes.present?
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.build_list.external_nodes')
|
||||
td= I18n.t("layout.build_lists.external_nodes.#{@mass_build.external_nodes}")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.auto_publish_status')
|
||||
td= t("layout.build_lists.auto_publish_status.#{@mass_build.auto_publish_status}")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.auto_create_container')
|
||||
td= t("layout.#{@mass_build.auto_create_container?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.increase_release_tag')
|
||||
td= t("layout.#{@mass_build.increase_release_tag?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.include_testing_subrepository')
|
||||
td= t("layout.#{@mass_build.include_testing_subrepository?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.use_cached_chroot')
|
||||
td= t("layout.#{@mass_build.use_cached_chroot?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.use_extra_tests')
|
||||
td= t("layout.#{@mass_build.use_extra_tests?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.created_at')
|
||||
td= @mass_build.created_at
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.description')
|
||||
td= @mass_build.description
|
||||
|
||||
table.table.table-striped
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.name')
|
||||
td= link_to_mass_build(@mass_build)
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.id')
|
||||
td= @mass_build.id
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.arch_names')
|
||||
td= @mass_build.arch_names
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.build_for_platform')
|
||||
td= link_to @mass_build.build_for_platform.name, platform_path(@mass_build.build_for_platform)
|
||||
- if @mass_build.external_nodes.present?
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.build_list.external_nodes')
|
||||
td= I18n.t("layout.build_lists.external_nodes.#{@mass_build.external_nodes}")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.auto_publish_status')
|
||||
td= t("layout.build_lists.auto_publish_status.#{@mass_build.auto_publish_status}")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.auto_create_container')
|
||||
td= t("layout.#{@mass_build.auto_create_container?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.increase_release_tag')
|
||||
td= t("layout.#{@mass_build.increase_release_tag?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.include_testing_subrepository')
|
||||
td= t("layout.#{@mass_build.include_testing_subrepository?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.use_cached_chroot')
|
||||
td= t("layout.#{@mass_build.use_cached_chroot?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.use_extra_tests')
|
||||
td= t("layout.#{@mass_build.use_extra_tests?}_")
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.created_at')
|
||||
td= @mass_build.created_at
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.mass_build.description')
|
||||
td= @mass_build.description
|
||||
tr
|
||||
td
|
||||
b= t("activerecord.attributes.build_list.extra_repositories")
|
||||
td
|
||||
- if @mass_build.extra_repositories.present?
|
||||
- Repository.where(id: @mass_build.extra_repositories).each do |repo|
|
||||
p= link_to "#{repo.platform.name}/#{repo.name}", [repo.platform, repo]
|
||||
- else
|
||||
= t('layout.false_')
|
||||
|
||||
tr
|
||||
td
|
||||
b= t("activerecord.attributes.build_list.extra_repositories")
|
||||
td
|
||||
- if @mass_build.extra_repositories.present?
|
||||
- Repository.where(id: @mass_build.extra_repositories).each do |repo|
|
||||
p= link_to "#{repo.platform.name}/#{repo.name}", [repo.platform, repo]
|
||||
- else
|
||||
= t('layout.false_')
|
||||
tr
|
||||
td
|
||||
b= t("activerecord.attributes.build_list.extra_mass_builds")
|
||||
td
|
||||
- if @mass_build.extra_mass_builds.present?
|
||||
- MassBuild.where(id: @mass_build.extra_mass_builds).each do |mb|
|
||||
p= link_to "#{mb.id} - #{mb.name}", platform_mass_build_path(mb.save_to_platform, mb)
|
||||
- else
|
||||
= t('layout.false_')
|
||||
|
||||
tr
|
||||
td
|
||||
b= t("activerecord.attributes.build_list.extra_mass_builds")
|
||||
td
|
||||
- if @mass_build.extra_mass_builds.present?
|
||||
- MassBuild.where(id: @mass_build.extra_mass_builds).each do |mb|
|
||||
p= link_to "#{mb.id} - #{mb.name}", platform_mass_build_path(mb.save_to_platform, mb)
|
||||
- else
|
||||
= t('layout.false_')
|
||||
tr
|
||||
td
|
||||
b= t("activerecord.attributes.build_list.extra_build_lists")
|
||||
td
|
||||
- if @mass_build.extra_build_lists.present?
|
||||
- BuildList.where(id: @mass_build.extra_build_lists).each do |bl|
|
||||
p= link_to "#{bl.id} (#{bl.project.name} - #{bl.arch.name})", bl
|
||||
- else
|
||||
= t('layout.false_')
|
||||
|
||||
tr
|
||||
td
|
||||
b= t("activerecord.attributes.build_list.extra_build_lists")
|
||||
td
|
||||
- if @mass_build.extra_build_lists.present?
|
||||
- BuildList.where(id: @mass_build.extra_build_lists).each do |bl|
|
||||
p= link_to "#{bl.id} (#{bl.project.name} - #{bl.arch.name})", bl
|
||||
- else
|
||||
= t('layout.false_')
|
||||
.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
|
||||
td
|
||||
= 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.statuses')
|
||||
td
|
||||
- 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
|
||||
td
|
||||
= 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')
|
||||
td
|
||||
- if @mass_build.projects_list.present?
|
||||
= link_to_list @platform, @mass_build, 'projects_list'
|
||||
tr
|
||||
td
|
||||
b= t('layout.mass_builds.lists')
|
||||
td
|
||||
- if @mass_build.projects_list.present?
|
||||
= link_to_list @platform, @mass_build, 'projects_list'
|
||||
|
|
||||
= link_to_list @platform, @mass_build, 'failed_builds_list'
|
||||
|
|
||||
= link_to_list @platform, @mass_build, 'tests_failed_builds_list'
|
||||
|
|
||||
= link_to_list @platform, @mass_build, 'success_builds_list'
|
||||
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'),
|
||||
publish_platform_mass_build_path(@platform, @mass_build.id),
|
||||
method: :post,
|
||||
data: { confirm: t("layout.confirm") },
|
||||
class: 'btn btn-success'
|
||||
|
|
||||
= 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'
|
||||
|
|
||||
= link_to_list @platform, @mass_build, 'failed_builds_list'
|
||||
|
|
||||
= link_to_list @platform, @mass_build, 'tests_failed_builds_list'
|
||||
|
|
||||
= link_to_list @platform, @mass_build, 'success_builds_list'
|
||||
.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'),
|
||||
publish_platform_mass_build_path(@platform, @mass_build.id),
|
||||
method: :post,
|
||||
data: { confirm: t("layout.confirm") },
|
||||
class: 'btn btn-success'
|
||||
hr
|
||||
= 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
|
||||
- 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
|
||||
- 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'
|
||||
- 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'
|
||||
- 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') }
|
||||
|
|
||||
- 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'
|
||||
|
|
||||
- if policy(@mass_build).show_fail_reason? && @mass_build.build_error_count > 0
|
||||
= link_to t('layout.mass_builds.show_fail_reason_link'),
|
||||
show_fail_reason_platform_mass_build_path,
|
||||
class: 'btn btn-info'
|
|
@ -3,37 +3,38 @@
|
|||
|
||||
= render 'submenu'
|
||||
|
||||
.col-xs-12.col-md-10.col-md-offset-1
|
||||
.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
|
||||
-if !@items.empty?
|
||||
table.table.table-condensed
|
||||
thead
|
||||
tr
|
||||
th
|
||||
= t("activerecord.attributes.build_list.id")
|
||||
th
|
||||
= t("activerecord.attributes.build_list.project")
|
||||
th
|
||||
= t("activerecord.attributes.build_list.arch")
|
||||
th
|
||||
= t("activerecord.attributes.build_list.fail_reason")
|
||||
tbody
|
||||
- @items.each do |item|
|
||||
tr
|
||||
td
|
||||
= link_to item[0], build_list_path(item[0])
|
||||
td
|
||||
= link_to item[1], project_path(item[1])
|
||||
td
|
||||
= item[2]
|
||||
td
|
||||
pre.pre-fail-reason
|
||||
= item[3]
|
||||
-else
|
||||
= t('layout.mass_builds.show_fail_reason.no_failed_builds')
|
||||
.row
|
||||
=will_paginate @build_lists
|
||||
.row
|
||||
.col-md-12
|
||||
rd-widget
|
||||
rd-widget-header title=t('layout.mass_builds.show_fail_reason.title')
|
||||
rd-widget-body
|
||||
.row
|
||||
= link_to t('layout.mass_builds.show_fail_reason.return'), platform_mass_build_path
|
||||
.row.top-space
|
||||
-if !@items.empty?
|
||||
table.table.table-condensed
|
||||
thead
|
||||
tr
|
||||
th
|
||||
= t("activerecord.attributes.build_list.id")
|
||||
th
|
||||
= t("activerecord.attributes.build_list.project")
|
||||
th
|
||||
= t("activerecord.attributes.build_list.arch")
|
||||
th
|
||||
= t("activerecord.attributes.build_list.fail_reason")
|
||||
tbody
|
||||
- @items.each do |item|
|
||||
tr
|
||||
td
|
||||
= link_to item[0], build_list_path(item[0])
|
||||
td
|
||||
= link_to item[1], project_path(item[1])
|
||||
td
|
||||
= item[2]
|
||||
td
|
||||
pre.pre-fail-reason
|
||||
= item[3]
|
||||
-else
|
||||
= t('layout.mass_builds.show_fail_reason.no_failed_builds')
|
||||
=will_paginate @build_lists, rd_widget_footer: true
|
|
@ -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))
|
||||
|
|
|
@ -1,63 +1,30 @@
|
|||
- set_meta_tags title: [title_object(@platform), t('layout.platforms.edit')]
|
||||
= render 'submenu'
|
||||
|
||||
.container.col-md-12
|
||||
.row
|
||||
= simple_form_for @platform, wrapper_mappings: { boolean: :vertical_boolean } do |f|
|
||||
= render 'form', f: f
|
||||
hr
|
||||
.row
|
||||
.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
|
||||
.row
|
||||
- if policy(@platform).destroy?
|
||||
hr
|
||||
p
|
||||
= t("layout.platforms.delete_warning")
|
||||
= link_to t("layout.delete"),
|
||||
platform_path(@platform),
|
||||
method: :delete,
|
||||
data: { confirm: t("layout.platforms.confirm_delete") },
|
||||
class: 'btn btn-danger'
|
||||
|
||||
- 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
|
||||
= t("layout.platforms.delete_warning")
|
||||
= link_to t("layout.delete"),
|
||||
platform_path(@platform),
|
||||
method: :delete,
|
||||
data: { confirm: t("layout.platforms.confirm_delete") },
|
||||
class: 'btn btn-danger'
|
||||
|
||||
- if policy(@platform).clear?
|
||||
p
|
||||
= t("layout.repositories.clear_warning")
|
||||
= link_to t("layout.repositories.clear"),
|
||||
clear_platform_path(@platform),
|
||||
class: 'btn btn-danger',
|
||||
data: { confirm: t('layout.repositories.clear_confirm') },
|
||||
method: :put
|
||||
- if policy(@platform).clear?
|
||||
p
|
||||
= t("layout.repositories.clear_warning")
|
||||
= link_to t("layout.repositories.clear"),
|
||||
clear_platform_path(@platform),
|
||||
class: 'btn btn-danger',
|
||||
data: { confirm: t('layout.repositories.clear_confirm') },
|
||||
method: :put
|
||||
|
|
|
@ -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')
|
|
@ -1,78 +1,68 @@
|
|||
- 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
|
||||
.col-md-6
|
||||
h3
|
||||
= t('layout.platforms.about')
|
||||
|
|
||||
= link_to @platform.name, platform_contents_path(@platform)
|
||||
.row
|
||||
.col-md-6
|
||||
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')
|
||||
td= @platform.description
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('activerecord.attributes.platform.description')
|
||||
.col-md-8= @platform.description
|
||||
- if @platform.parent
|
||||
tr
|
||||
td
|
||||
b= t('activerecord.attributes.platform.parent')
|
||||
td
|
||||
= link_to @platform.parent.description, platform_path(@platform.parent)
|
||||
tr
|
||||
td
|
||||
b= t('layout.platforms.owner')
|
||||
td= link_to @platform.owner.try(:uname) + ' (' + @platform.owner.try(:name) + ')', url_for(@platform.owner)
|
||||
|
||||
- if @platform.parent
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('activerecord.attributes.platform.parent')
|
||||
.col-md-8
|
||||
= link_to @platform.parent.description, platform_path(@platform.parent)
|
||||
tr
|
||||
td
|
||||
b= t('layout.platforms.visibility')
|
||||
td= t("layout.visibilities.#{@platform.visibility}")
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.owner')
|
||||
.col-md-8= link_to @platform.owner.try(:name), url_for(@platform.owner)
|
||||
tr
|
||||
td
|
||||
b= t('layout.platforms.platform_type')
|
||||
td= @platform.platform_type
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.visibility')
|
||||
.col-md-8= t("layout.visibilities.#{@platform.visibility}")
|
||||
tr
|
||||
td
|
||||
b= t('layout.platforms.distrib_type')
|
||||
td= @platform.distrib_type
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.platform_type')
|
||||
.col-md-8= @platform.platform_type
|
||||
- if @platform.platform_type == 'personal' and @platform.visibility == 'open'
|
||||
.col-md-6 ng-controller='PlatformSysReposController' ng-init="init(#{@platform.id})"
|
||||
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')
|
||||
.col-md-8
|
||||
select ng-model='platform' ng-change='updateCommand()'
|
||||
option ng-repeat='platform in platforms' ng-value='platform'
|
||||
| {{ platform }}
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
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')
|
||||
|
||||
- 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')
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.target_platform')
|
||||
.col-md-8
|
||||
select ng-model='platform' ng-change='updateCommand()'
|
||||
option ng-repeat='platform in platforms' ng-value='platform'
|
||||
| {{ platform }}
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.target_architecture')
|
||||
.col-md-8
|
||||
select ng-model='arch' ng-change='updateCommand()'
|
||||
option ng-repeat='arch in arches' ng-value='arch'
|
||||
| {{ arch }}
|
||||
.row
|
||||
br
|
||||
textarea.form-control readonly='readonly' ng-model='command' rows=3 ng-click='selectAll($event)'
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.target_architecture')
|
||||
.col-md-8
|
||||
select ng-model='arch' ng-change='updateCommand()'
|
||||
option ng-repeat='arch in arches' ng-value='arch'
|
||||
| {{ arch }}
|
||||
.row
|
||||
br
|
||||
textarea.form-control readonly='readonly' ng-model='command' rows=3 ng-click='selectAll($event)'
|
||||
|
|
|
@ -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
|
|
@ -1,39 +1,25 @@
|
|||
- set_meta_tags title: [title_object(@product), t('layout.product_build_lists.new')]
|
||||
= render 'submenu'
|
||||
|
||||
.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,
|
||||
input_html: { value: pbl.project.name_with_owner },
|
||||
disabled: true
|
||||
|
||||
.container.col-md-12
|
||||
.row
|
||||
- pbl = @product_build_list
|
||||
= simple_form_for @product_build_list, url: platform_product_product_build_lists_path(@platform, @product) do |f|
|
||||
= f.input :project,
|
||||
input_html: { value: pbl.project.name_with_owner },
|
||||
disabled: true
|
||||
= f.input :project_version,
|
||||
as: :grouped_select,
|
||||
collection: versions_for_group_select(pbl.project),
|
||||
group_method: :last,
|
||||
include_blank: false
|
||||
|
||||
= f.input :project_version,
|
||||
as: :grouped_select,
|
||||
collection: versions_for_group_select(pbl.project),
|
||||
group_method: :last,
|
||||
include_blank: false
|
||||
= f.input :main_script
|
||||
= f.input :params
|
||||
= f.input :time_living, input_html: { value: (pbl.time_living.to_i / 60) }
|
||||
|
||||
= f.input :main_script
|
||||
= f.input :params
|
||||
= 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')
|
||||
= f.button :submit, t('layout.projects.build_button')
|
|
@ -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,130 +7,118 @@
|
|||
- product = pbl.product
|
||||
- platform = product.platform
|
||||
|
||||
.container.col-md-12 ng-controller='ProductBuildListController'
|
||||
.row
|
||||
h3
|
||||
= t('layout.product_build_lists.main_data')
|
||||
.row ng-controller='ProductBuildListController' ng-init=("init("+pbl.id.to_s+")")
|
||||
.col-md-6
|
||||
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')
|
||||
td
|
||||
= pbl.id
|
||||
|
||||
.row
|
||||
= hidden_field_tag :product_build_list_id, pbl.id
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.id')
|
||||
.col-md-6
|
||||
= pbl.id
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.status')
|
||||
td
|
||||
| {{pbl.human_status}}
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.status')
|
||||
.col-md-6
|
||||
| {{pbl.human_status}}
|
||||
- if pbl.user
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.user')
|
||||
td
|
||||
= link_to pbl.user.try(:fullname), pbl.user
|
||||
|
||||
- if pbl.user
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.user')
|
||||
.col-md-6
|
||||
= link_to pbl.user.try(:fullname), pbl.user
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.product')
|
||||
td
|
||||
= link_to pbl.product.name, platform_product_path(platform, product)
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.product')
|
||||
.col-md-6
|
||||
= link_to pbl.product.name, platform_product_path(platform, product)
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.project')
|
||||
td
|
||||
= link_to pbl.project.name_with_owner, project_path(pbl.project)
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.project')
|
||||
.col-md-6
|
||||
= link_to pbl.project.name_with_owner, project_path(pbl.project)
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.project_version')
|
||||
td
|
||||
= product_build_list_version_link(pbl, true)
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.project_version')
|
||||
.col-md-6
|
||||
= product_build_list_version_link(pbl, true)
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.main_script')
|
||||
td
|
||||
= pbl.main_script
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.main_script')
|
||||
.col-md-6
|
||||
= pbl.main_script
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.params')
|
||||
td
|
||||
= pbl.params
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.params')
|
||||
.col-md-6
|
||||
= pbl.params
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.time_living')
|
||||
td
|
||||
= pbl.time_living / 60
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.time_living')
|
||||
.col-md-6
|
||||
= pbl.time_living / 60
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.autostarted')
|
||||
td
|
||||
= t("layout.#{pbl.autostarted}_")
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.autostarted')
|
||||
.col-md-6
|
||||
= t("layout.#{pbl.autostarted}_")
|
||||
tr
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.notified_at')
|
||||
td
|
||||
| {{pbl.notified_at}}
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.notified_at')
|
||||
.col-md-6
|
||||
| {{pbl.notified_at}}
|
||||
- if policy(pbl).update?
|
||||
tr ng-show="pbl.status == #{ ProductBuildList::BUILD_COMPLETED }"
|
||||
td
|
||||
= t('activerecord.attributes.product_build_list.not_delete')
|
||||
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.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
|
||||
= t('layout.product_build_lists.will_be_removed_n_days', n: days)
|
||||
- else
|
||||
= t('layout.product_build_lists.will_be_removed_today')
|
||||
|
||||
- if policy(pbl).update?
|
||||
.row ng-show="pbl.status == #{ ProductBuildList::BUILD_COMPLETED }"
|
||||
.col-md-6
|
||||
b
|
||||
= t('activerecord.attributes.product_build_list.not_delete')
|
||||
.col-md-6
|
||||
= select_tag 'not_delete',
|
||||
options_for_select(product_build_list_delete_options),
|
||||
{ ng_model: "pbl.not_delete", ng_change: 'updateStatus()'}
|
||||
- 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)
|
||||
data-method = 'put'
|
||||
data-confirm = t('layout.confirm')
|
||||
ng-show = 'pbl.can_cancel' ]
|
||||
= t('layout.build_lists.cancel')
|
||||
|
|
||||
|
||||
.row.alert.alert-danger.offset10 ng-hide='pbl.not_delete'
|
||||
- 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
|
||||
= t('layout.product_build_lists.will_be_removed_n_days', n: days)
|
||||
- else
|
||||
= t('layout.product_build_lists.will_be_removed_today')
|
||||
|
||||
.row
|
||||
hr
|
||||
- if policy(pbl).cancel?
|
||||
a.btn.btn-warning[
|
||||
href=cancel_platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl)
|
||||
data-method = 'put'
|
||||
data-confirm = t('layout.confirm')
|
||||
ng-show = 'pbl.can_cancel' ]
|
||||
= t('layout.build_lists.cancel')
|
||||
|
|
||||
|
||||
- if policy(pbl).destroy?
|
||||
a.btn.btn-danger[
|
||||
href=platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl)
|
||||
data-method = 'delete'
|
||||
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
|
||||
- if policy(pbl).destroy?
|
||||
a.btn.btn-danger[
|
||||
href=platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl)
|
||||
data-method = 'delete'
|
||||
data-confirm = t('layout.confirm')
|
||||
ng-show = 'pbl.can_destroy' ]
|
||||
= t('layout.product_build_lists.delete')
|
||||
.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) }
|
||||
|
||||
|
||||
|
|
|
@ -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,
|
||||
as: :grouped_select,
|
||||
collection: versions_for_group_select(@product.project),
|
||||
group_method: :last,
|
||||
include_blank: false
|
||||
= f.input :project_version,
|
||||
as: :grouped_select,
|
||||
group_method: :last,
|
||||
include_blank: false,
|
||||
input_html: { ng_disabled: 'loadingVersions', ng_bind_html: 'projectVersions' }
|
||||
|
||||
= f.input :main_script
|
||||
= f.input :params
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
||||
= link_to @product.name, platform_product_path(@platform, @product)
|
||||
|
||||
= simple_form_for [@platform, @product] do |f|
|
||||
= render 'form', f: f
|
||||
.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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
- if policy(@platform.products.build).create?
|
||||
a.btn.btn-primary href=new_platform_product_path(@platform)
|
||||
= t('layout.products.new')
|
||||
hr
|
||||
|
||||
= render 'list', object: @products
|
||||
= will_paginate @products
|
||||
.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.pull-right href=new_platform_product_path(@platform)
|
||||
= t('layout.products.new')
|
||||
rd-widget-body class="no-padding"
|
||||
= render 'list', object: @products
|
||||
= will_paginate @products, rd_widget_footer: true
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
- set_meta_tags title: [title_object(@platform), t('layout.products.new')]
|
||||
= render 'submenu'
|
||||
|
||||
|
||||
.container.col-md-12
|
||||
.row
|
||||
= simple_form_for [@platform, @product] do |f|
|
||||
= render 'form', f: f
|
||||
.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
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
json.project_versions grouped_options_for_select(versions_for_group_select(@project), params[:project_version])
|
|
@ -1,49 +1,42 @@
|
|||
- 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')
|
||||
|
|
||||
= @product.name
|
||||
|
||||
p= @product.description
|
||||
|
||||
- if policy(@product).update?
|
||||
a.btn.btn-primary href=edit_platform_product_path(@platform, @product)
|
||||
= t('layout.edit')
|
||||
|
|
||||
- if policy(@product).destroy?
|
||||
a.btn.btn-danger[ href = platform_product_path(@platform, @product)
|
||||
data-method = 'delete'
|
||||
data-confirm = t('layout.products.confirm_delete') ]
|
||||
= t('layout.delete')
|
||||
|
|
||||
- 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")
|
||||
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= t("activerecord.attributes.product_build_list.id")
|
||||
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
|
||||
.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')
|
||||
|
|
||||
- if policy(@product).destroy?
|
||||
a.btn.btn-danger[ href = platform_product_path(@platform, @product)
|
||||
data-method = 'delete'
|
||||
data-confirm = t('layout.products.confirm_delete') ]
|
||||
= t('layout.delete')
|
||||
|
|
||||
- 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')
|
||||
.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
|
||||
th= t("activerecord.attributes.product_build_list.id")
|
||||
th= t("activerecord.attributes.product_build_list.status")
|
||||
th= t("activerecord.attributes.product_build_list.product")
|
||||
th= t("layout.product_build_lists.action")
|
||||
tbody
|
||||
= render partial: 'platforms/product_build_lists/product_build_list',
|
||||
collection: @product_build_lists
|
||||
= will_paginate @product_build_lists, rd_widget_footer: true
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
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')
|
||||
|
||||
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'
|
||||
|
|
||||
a ng-href='{{project.path}}'
|
||||
| {{project.name}}
|
||||
td
|
||||
a ng-href='{{project.add_path}}' ng-show='project.add_path'
|
||||
= t('layout.add')
|
||||
a.pointer[ng-href = ''
|
||||
ng-show = 'project.remove_path'
|
||||
ng-click = 'removeProject(project)']
|
||||
span.glyphicon.glyphicon-remove
|
||||
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
|
||||
tbody ng-hide='processing'
|
||||
tr ng-repeat='project in projects' ng-cloak = true
|
||||
td
|
||||
i.fa ng-class='project.visibility_class'
|
||||
|
|
||||
|
||||
= angularjs_paginate
|
||||
a ng-href='{{project.path}}'
|
||||
| {{project.name}}
|
||||
td
|
||||
a ng-href='{{project.add_path}}' ng-show='project.add_path'
|
||||
= t('layout.add')
|
||||
a.pointer[ng-href = ''
|
||||
ng-show = 'project.remove_path'
|
||||
ng-click = 'removeProject(project)']
|
||||
span.glyphicon.glyphicon-remove
|
||||
|
|
||||
rd-widget-footer ng-show="total_items > 20"
|
||||
= angularjs_paginate
|
|
@ -1,73 +1,66 @@
|
|||
-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")
|
||||
|
|
||||
i
|
||||
= @repository.name
|
||||
|
||||
.row
|
||||
|
||||
= simple_form_for @repository, url: platform_repository_path(@platform, @repository) do |f|
|
||||
= render "form", f: f
|
||||
hr
|
||||
.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
|
||||
|
||||
- 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?
|
||||
- label = t('layout.repositories.remove_sync_lock_file')
|
||||
- path = sync_lock_file_platform_repository_path(@platform, @repository, remove: true)
|
||||
- else
|
||||
- label = t('layout.repositories.add_sync_lock_file')
|
||||
- path = sync_lock_file_platform_repository_path(@platform, @repository)
|
||||
= simple_form_for @repository, url: path, html: { method: :put } do |f|
|
||||
.col-md-8
|
||||
= t('layout.repositories.sync_lock_file_info')
|
||||
.col-md-2
|
||||
= f.button :submit, label, data: { confirm: t('layout.confirm') }, class: 'btn-warning'
|
||||
|
||||
- if @platform.main?
|
||||
.row
|
||||
- if @repository.sync_lock_file_exists?
|
||||
- label = t('layout.repositories.remove_sync_lock_file')
|
||||
- path = sync_lock_file_platform_repository_path(@platform, @repository, remove: true)
|
||||
- else
|
||||
- label = t('layout.repositories.add_sync_lock_file')
|
||||
- path = sync_lock_file_platform_repository_path(@platform, @repository)
|
||||
= simple_form_for @repository, url: path, html: { method: :put } do |f|
|
||||
.col-md-8
|
||||
= t('layout.repositories.sync_lock_file_info')
|
||||
.col-md-2
|
||||
= f.button :submit, label, data: { confirm: t('layout.confirm') }, class: 'btn-warning'
|
||||
.row.offset10
|
||||
= simple_form_for @repository, url: regenerate_metadata_platform_repository_path(@platform, @repository), html: { method: :put } do |f|
|
||||
.col-md-6
|
||||
= t('layout.repositories.regenerate_metadata')
|
||||
.col-md-2
|
||||
- if @platform.personal?
|
||||
= f.input :build_for_platform_id, collection: platform_options, label: false, include_blank: false
|
||||
.col-md-2
|
||||
= f.button :submit, t('layout.repositories.regenerate_metadata'), data: { confirm: t('layout.confirm') }, class: 'btn-warning'
|
||||
|
||||
.row.offset10
|
||||
= simple_form_for @repository, url: regenerate_metadata_platform_repository_path(@platform, @repository), html: { method: :put } do |f|
|
||||
.col-md-6
|
||||
= t('layout.repositories.regenerate_metadata')
|
||||
.col-md-2
|
||||
- if @platform.personal?
|
||||
= f.input :build_for_platform_id, collection: platform_options, label: false, include_blank: false
|
||||
.col-md-2
|
||||
= f.button :submit, t('layout.repositories.regenerate_metadata'), data: { confirm: t('layout.confirm') }, class: 'btn-warning'
|
||||
|
||||
- if @repository.repository_statuses.present?
|
||||
.row
|
||||
hr
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= t('activerecord.attributes.regeneration_status.status')
|
||||
th= t('activerecord.attributes.regeneration_status.last_regenerated_status')
|
||||
th= t('activerecord.attributes.regeneration_status.last_regenerated_log_sha1')
|
||||
th= t('activerecord.attributes.regeneration_status.last_regenerated_at')
|
||||
- unless @platform.main?
|
||||
th= t('activerecord.models.platform')
|
||||
tbody
|
||||
- @repository.repository_statuses.sort_by{ |s| s.platform.name }.each do |status|
|
||||
tr
|
||||
td= t("layout.regeneration_statuses.statuses.#{status.human_status}")
|
||||
td= t("layout.regeneration_statuses.last_regenerated_statuses.#{status.human_regeneration_status}")
|
||||
td= link_to_file_store('regeneration.log', status.last_regenerated_log_sha1)
|
||||
td= status.last_regenerated_at
|
||||
- unless @platform.main?
|
||||
td= status.platform.name
|
||||
hr
|
||||
|
||||
.row
|
||||
- if @platform.main?
|
||||
- if @repository.repository_statuses.present?
|
||||
.row.top-space
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
th= t('activerecord.attributes.regeneration_status.status')
|
||||
th= t('activerecord.attributes.regeneration_status.last_regenerated_status')
|
||||
th= t('activerecord.attributes.regeneration_status.last_regenerated_log_sha1')
|
||||
th= t('activerecord.attributes.regeneration_status.last_regenerated_at')
|
||||
- unless @platform.main?
|
||||
th= t('activerecord.models.platform')
|
||||
tbody
|
||||
- @repository.repository_statuses.sort_by{ |s| s.platform.name }.each do |status|
|
||||
tr
|
||||
td= t("layout.regeneration_statuses.statuses.#{status.human_status}")
|
||||
td= t("layout.regeneration_statuses.last_regenerated_statuses.#{status.human_regeneration_status}")
|
||||
td= link_to_file_store('regeneration.log', status.last_regenerated_log_sha1)
|
||||
td= status.last_regenerated_at
|
||||
- unless @platform.main?
|
||||
td= status.platform.name
|
||||
- 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),
|
||||
|
|
|
@ -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)
|
||||
= t("layout.repositories.new")
|
||||
hr
|
||||
.row
|
||||
|
||||
= render 'list', object: @repositories
|
||||
= will_paginate @repositories
|
||||
.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")
|
||||
rd-widget-body class="no-padding"
|
||||
= render 'list', object: @repositories
|
||||
= will_paginate @repositories
|
|
@ -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
|
|
@ -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
|
||||
= simple_form_for @repository, url: platform_repositories_path(@platform) do |f|
|
||||
= render 'form', f: f
|
||||
.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
|
||||
|
|
|
@ -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
|
|
@ -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'
|
|
@ -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")
|
||||
|
|
||||
i
|
||||
= @repository.name
|
||||
|
||||
p= @repository.description
|
||||
.row
|
||||
- if policy(@repository).update?
|
||||
a.btn.btn-primary href=edit_platform_repository_path(@platform, @repository)
|
||||
= t("layout.edit")
|
||||
|
|
||||
- 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')
|
||||
|
|
||||
- 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'
|
||||
.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
|
||||
- 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")
|
||||
|
|
||||
- if policy(@repository).manage_projects?
|
||||
a.btn.btn-primary href=manage_projects_platform_repository_path(@platform, @repository)
|
||||
= t('layout.projects.manage_projects')
|
||||
|
|
||||
- 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") }
|
|
@ -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'
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -22,7 +22,8 @@ div[ ng-controller='BuildListController'
|
|||
= render 'shared/build_results', subject: @build_list
|
||||
|
||||
.row.top-space ng-show="build_list.status == #{BuildList::BUILD_STARTED}"
|
||||
= render 'shared/log', { build_started: true, get_log_path: log_build_list_path(@build_list) }
|
||||
.col-md-12
|
||||
= render 'shared/log', { build_started: true, get_log_path: log_build_list_path(@build_list) }
|
||||
|
||||
.row.top-space
|
||||
.col-md-10
|
||||
|
@ -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|
|
||||
= render 'buttons', build_list: @build_list
|
||||
.buttons-block
|
||||
= render 'buttons', build_list: @build_list
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,42 +1,25 @@
|
|||
.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
|
||||
.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')
|
||||
|
|
||||
= t('layout.or')
|
||||
|
|
||||
a href=search_index_path
|
||||
= t('layout.clear')
|
||||
.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-3
|
||||
.panel.panel-default
|
||||
.panel-body
|
||||
ul.nav.nav-pills.nav-stacked
|
||||
- t('.types').each do |k, v|
|
||||
li class=('active' if k.to_s == @type)
|
||||
a href=search_index_path(params.merge(type: k, page: 1))
|
||||
span.badge.pull-right
|
||||
= @search.send(k).count
|
||||
= v
|
||||
|
||||
|
||||
.row
|
||||
.col-md-3.col-md-offset-1
|
||||
.panel.panel-default
|
||||
.panel-body
|
||||
ul.nav.nav-pills.nav-stacked
|
||||
- t('.types').each do |k, v|
|
||||
li class=('active' if k.to_s == @type)
|
||||
a href=search_index_path(params.merge(type: k, page: 1))
|
||||
span.badge.pull-right
|
||||
= @search.send(k).count
|
||||
= v
|
||||
|
||||
|
||||
.col-md-7
|
||||
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
|
||||
.col-md-9
|
||||
table.table.table-striped
|
||||
tbody
|
||||
- @collection.each do |c|
|
||||
tr
|
||||
td= render @type.singularize, @type.singularize.to_sym => c
|
||||
= will_paginate @collection, rd_widget_footer: true
|
||||
|
|
|
@ -2,13 +2,25 @@
|
|||
/ $scope.goToPage = (number) ->
|
||||
/ $location.search('page', number)
|
||||
|
||||
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-show = "#{total_items} > #{per_page}"
|
||||
ng-change = select_page ]
|
||||
- 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 = "›"
|
||||
first-text = "«" last-text = "»"
|
||||
items-per-page = per_page
|
||||
max-size = 5
|
||||
rotate = 'false'
|
||||
ng-show = "#{total_items} > #{per_page}"
|
||||
ng-change = select_page ]
|
|
@ -1,80 +1,82 @@
|
|||
- update_roles_path ||= false
|
||||
= form_tag remove_members_path, id: 'members_form', method: :delete do
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr
|
||||
- if policy(editable_object).remove_members?
|
||||
th
|
||||
th
|
||||
= t("layout.collaborators.members")
|
||||
- if policy(editable_object).remove_members?
|
||||
- if update_roles_path
|
||||
th.buttons.text-center colspan=3
|
||||
= t("layout.collaborators.roles")
|
||||
th.buttons
|
||||
= t("layout.remove")
|
||||
tbody
|
||||
- if update_roles_path
|
||||
- actors ||= editable_object.actors
|
||||
- members.each do |user|
|
||||
tr
|
||||
- if policy(editable_object).remove_members?
|
||||
td
|
||||
= check_box_tag "members[]", user.id
|
||||
td
|
||||
span
|
||||
= image_tag avatar_url(user), size: '30x30'
|
||||
|
|
||||
= link_to user.fullname, user_path(user)
|
||||
- if policy(editable_object).remove_members?
|
||||
- if update_roles_path
|
||||
- actor = actors.find{ |a| a.actor_id == user.id }
|
||||
- Relation::ROLES.each_with_index do |role, i|
|
||||
td ng-init="user_#{user.id}_role = '#{actor.role}'"
|
||||
input[
|
||||
type = 'radio'
|
||||
ng-model = "user_#{user.id}_role"
|
||||
value = role ]
|
||||
|
|
||||
= t("layout.collaborators.role_names.#{ role }")
|
||||
td
|
||||
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
|
||||
- if policy(editable_object).remove_members?
|
||||
th
|
||||
th
|
||||
= t("layout.collaborators.members")
|
||||
- if policy(editable_object).remove_members?
|
||||
- if update_roles_path
|
||||
- path = "#{update_roles_path}?member_id=#{user.id}"
|
||||
a[
|
||||
ng-href = "{{'#{path}&role=' + user_#{user.id}_role}}"
|
||||
data-method = 'put'
|
||||
data-confirm = t('layout.confirm') ]
|
||||
th.buttons.text-center colspan=3
|
||||
= t("layout.collaborators.roles")
|
||||
th.buttons
|
||||
= t("layout.remove")
|
||||
tbody
|
||||
- if update_roles_path
|
||||
- actors ||= editable_object.actors
|
||||
- members.each do |user|
|
||||
tr
|
||||
- if policy(editable_object).remove_members?
|
||||
td
|
||||
= check_box_tag "members[]", user.id
|
||||
td
|
||||
span
|
||||
= image_tag avatar_url(user), size: '30x30'
|
||||
|
|
||||
= link_to user.fullname, user_path(user)
|
||||
- if policy(editable_object).remove_members?
|
||||
- if update_roles_path
|
||||
- actor = actors.find{ |a| a.actor_id == user.id }
|
||||
- Relation::ROLES.each_with_index do |role, i|
|
||||
td ng-init="user_#{user.id}_role = '#{actor.role}'"
|
||||
input[
|
||||
type = 'radio'
|
||||
ng-model = "user_#{user.id}_role"
|
||||
value = role ]
|
||||
|
|
||||
= t("layout.collaborators.role_names.#{ role }")
|
||||
td
|
||||
- if update_roles_path
|
||||
- path = "#{update_roles_path}?member_id=#{user.id}"
|
||||
a[
|
||||
ng-href = "{{'#{path}&role=' + user_#{user.id}_role}}"
|
||||
data-method = 'put'
|
||||
data-confirm = t('layout.confirm') ]
|
||||
|
||||
span.glyphicon.glyphicon-ok
|
||||
|
|
||||
span.glyphicon.glyphicon-ok
|
||||
|
|
||||
|
||||
= link_to "#{remove_members_path}?members=#{user.id}", method: :delete, data: { confirm: t("layout.confirm") } do
|
||||
span.glyphicon.glyphicon-remove
|
||||
|
|
||||
= link_to "#{remove_members_path}?members=#{user.id}", method: :delete, data: { confirm: t("layout.confirm") } do
|
||||
span.glyphicon.glyphicon-remove
|
||||
|
|
||||
|
||||
- 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).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', ng_controller:"MembersController" },
|
||||
wrapper: :inline_form do |f|
|
||||
|
||||
= simple_form_for :user, url: add_member_path,
|
||||
html: { class: 'form-inline' },
|
||||
wrapper: :inline_form do |f|
|
||||
= hidden_field_tag 'member_id', nil, value: '{{memberId}}'
|
||||
- autocomplete_path ||= autocomplete_user_uname_autocompletes_path
|
||||
= f.input :uname,
|
||||
input_html: { uib_typeahead: 'user.name for user in getUsers($viewValue)',
|
||||
typeahead_on_select: 'select($item, $model, $label)',
|
||||
ng_model: 'member' }
|
||||
|
||||
= hidden_field_tag 'member_id', nil, id: 'member_id_field'
|
||||
- autocomplete_path ||= autocomplete_user_uname_autocompletes_path
|
||||
= f.input :uname,
|
||||
input_html: { 'data-ajax' => autocomplete_path,
|
||||
'data-id' => '#member_id_field',
|
||||
class: 'typeahead' }
|
||||
- if update_roles_path
|
||||
|
|
||||
= f.input :role,
|
||||
collection: options_for_collaborators_roles_select,
|
||||
input_html: { name: :role },
|
||||
include_blank: false
|
||||
|
||||
- if update_roles_path
|
||||
|
|
||||
= f.input :role,
|
||||
collection: options_for_collaborators_roles_select,
|
||||
input_html: { name: :role },
|
||||
include_blank: false
|
||||
|
||||
|
|
||||
= f.button :submit, t('layout.add')
|
||||
|
|
||||
= f.button :submit, t('layout.add')
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
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
|
||||
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
|
||||
a ng-href='{{project.path}}'
|
||||
| {{project.name}}
|
||||
= angularjs_paginate rd_widget_footer: true
|
|
@ -4,40 +4,41 @@
|
|||
|
||||
.row
|
||||
.col-md-3.col-md-offset-1
|
||||
- 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
|
||||
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
|
||||
hr
|
||||
|
||||
- if @user.professional_experience.present?
|
||||
b= t('activerecord.attributes.user.professional_experience')
|
||||
p= @user.professional_experience
|
||||
- if @user.professional_experience.present?
|
||||
b= t('activerecord.attributes.user.professional_experience')
|
||||
p= @user.professional_experience
|
||||
|
||||
- unless @user.hide_email?
|
||||
b= t('activerecord.attributes.user.email')
|
||||
p= mail_to @user.email, @user.email.truncate(50), title: @user.email
|
||||
- unless @user.hide_email?
|
||||
b= t('activerecord.attributes.user.email')
|
||||
p= mail_to @user.email, @user.email.truncate(50), title: @user.email
|
||||
|
||||
- if @user.site.present?
|
||||
b= t('activerecord.attributes.user.site')
|
||||
p= link_to @user.site.truncate(50), @user.site
|
||||
- if @user.site.present?
|
||||
b= t('activerecord.attributes.user.site')
|
||||
p= link_to @user.site.truncate(50), @user.site
|
||||
|
||||
- if @user.company.present?
|
||||
b= t('activerecord.attributes.user.company')
|
||||
p= @user.company.truncate(50)
|
||||
- if @user.company.present?
|
||||
b= t('activerecord.attributes.user.company')
|
||||
p= @user.company.truncate(50)
|
||||
|
||||
- if @user.location.present?
|
||||
b= t('activerecord.attributes.user.location')
|
||||
p= @user.location.truncate(50)
|
||||
hr
|
||||
h4= t('top_menu.groups')
|
||||
- size = User::AVATAR_SIZES[:micro]
|
||||
- @groups.each do |group|
|
||||
p
|
||||
=> image_tag avatar_url(group, :micro), alt: group.uname, height: size, width: size
|
||||
= link_to group.uname.truncate(20), group
|
||||
- if @user.location.present?
|
||||
b= t('activerecord.attributes.user.location')
|
||||
p= @user.location.truncate(50)
|
||||
hr
|
||||
h4= t('top_menu.groups')
|
||||
- size = User::AVATAR_SIZES[:micro]
|
||||
- @groups.each do |group|
|
||||
p
|
||||
=> image_tag avatar_url(group, :micro), alt: group.uname, height: size, width: size
|
||||
= link_to group.uname.truncate(20), group
|
||||
|
||||
.col-md-7
|
||||
|
||||
|
@ -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 ]
|
||||
= render 'statistics'
|
||||
rd-widget
|
||||
rd-widget-header title=t('top_menu.statistics')
|
||||
rd-widget-body
|
||||
= render 'statistics'
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue