Implement suggestions

This commit is contained in:
Wedge 2016-05-28 22:59:35 +03:00
parent ac1b4b583d
commit ad65691471
13 changed files with 88 additions and 77 deletions

View File

@ -7,7 +7,7 @@ function($scope, BuildListsService, $location, $interval, $uibModal) {
var selectedProject = "";
var refresh, is_autoreload_on;
var default_filters = {page: '1', per_page: '25', 'ownership': 'owned'};
var default_filters = {page: '1', per_page: '25', 'ownership': 'everything'};
$scope.setAutoreload = function(autoreload) {
is_autoreload_on = autoreload;

View File

@ -36,7 +36,8 @@ var BuildList = function(atts, dictionary) {
self.version_link_text = self.commit_hash || self.project_version;
self.version_link_url = Routes.commit_path(self.project.name_with_owner, self.version_link_text);
}
self.project.url = '';//Routes.project_path(self.project.name_with_owner);
self.project.url = Routes.project_build_lists_path(self.project.name_with_owner);
console.log(self.project.url);
}
if (self.user)

View File

@ -33,7 +33,6 @@ html
== yield
script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js" type="text/javascript"
script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.min.js" type="text/javascript"
script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-resource.min.js" type="text/javascript"

View File

@ -2,7 +2,6 @@ li.sidebar-list
div.form-inline.no-indent
= form_tag search_index_path, method: 'get', role: 'search' do
= text_field_tag 'query', @query, placeholder: t('layout.search.header'), class: 'form-control', ng_show: 'toggle'
-if current_user
li.sidebar-title
span
= t 'top_menu_labels.navigation'
@ -12,6 +11,16 @@ li.sidebar-list
a href=send("#{base}_path")
= title
span.menu-icon.fa class=top_menu_icon(base)
li.sidebar-list
a href="http://repoclosure.openmandriva.org"
| Repoclosure
span.menu-icon.fa.fa-circle-o
- if current_user.try(:admin?)
li.sidebar-list
a href=admin_users_path
= t('admins_menu_header')
span.menu-icon.fa.fa-lock
- if current_user
li.sidebar-title
span
= t 'top_menu_labels.account'
@ -28,6 +37,9 @@ li.sidebar-list
= t('layout.logout')
span.menu-icon.fa.fa-sign-out
- else
li.sidebar-title
span
= t 'top_menu_labels.account'
li.sidebar-list
a href=new_user_registration_path
= t('layout.devise.shared_links.sign_up')

View File

@ -99,7 +99,7 @@
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}"
- path = build_lists_path+"#?#{{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

View File

@ -122,4 +122,38 @@ div ng-init=("init("+pbl.id.to_s+")") ng-controller='ProductBuildListController'
.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) }
.row.top-space
.col-md-6
rd-widget
div ng-controller="ProjectInfoController"
rd-widget-header title=(t('dashboard.project_info.title') + '{{widget_title}}')
rd-widget-body class="medium" loading="requesting"
div ng-hide="widget_title"
= t('dashboard.project_info.select')
div ng-show="widget_title"
div
a ng-href="{{project_info.html_url}}" target="_blank"
| {{project}}
div.bottom-space
| {{project_info.description}}
div
div.bottom-space ng-repeat="commit in project_info.commits"
div
span
| {{::commit.branch}}
span.pull-right
a ng-href="{{::commit.committer_url}}" target="_blank"
| {{::commit.committer_login}}
div
a ng-href="{{::commit.url}}" target="_blank"
| {{::commit.sha}}
div
| {{::commit.message}}
- 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')

View File

@ -2,7 +2,7 @@ json.projects @projects do |project|
#json.visibility_class fa_visibility_icon(project)
json.path project_build_lists_path(project.name_with_owner)
json.name project.name_with_owner
json.add_path url_for(controller: :repositories, action: :add_project, project_id: project.id)
json.add_path add_project_platform_repository_path @platform.name, @repository.name, project_id: project.id
end
json.total_items @total_items

View File

@ -21,7 +21,7 @@ div ng-controller='RepositoryProjectsController' ng-init=("init("+(controller.ac
a ng-href='{{project.path}}'
| {{project.name}}
td
a ng-href='{{project.add_path}}' ng-show='project.add_path'
a ng-href='{{project.add_path}}' data-method="put" ng-show='project.add_path'
= t('layout.add')
a.pointer[ng-href = ''
ng-show = 'project.remove_path'

View File

@ -1,6 +1,6 @@
script type="text/ng-template" id="build_list_filters.html"
.modal-header
| Bleh
= t 'layout.build_lists.filters'
.modal-body
.row
- html_options = { class: 'form-control' }
@ -52,6 +52,12 @@ script type="text/ng-template" id="build_list_filters.html"
'datepicker-options' => 'datePickerCtrl.dateOptions',
'date-disabled' => "datePickerCtrl.disabled(date, mode)",
'ng-click' => "datePickerCtrl.open_#{attr}($event)"
h4.medium= t 'layout.build_lists.project_name_search'
input#filter_project_name.form-control[ name = 'project_name'
size = '30'
type = 'text'
ng-model = 'params.project_name'
disabled = @project.present? ]
.modal-footer
button.btn.btn-primary type = 'button' ng-click = 'apply()'

View File

@ -4,6 +4,10 @@
rd-widget
rd-widget-header title="Build Lists {{::widgetTitle}}" icon="fa-gears"
.form-inline.pull-right ng-init="autoreload=true"
- if @project
a.btn.btn-default [ href=("https://github.com/" + @project.github_get_organization + "/" + @project.name)
target="_blank" ]
= t('menu.project_menu.github')
- if @project and policy(@project.build_lists.build).create?
a.btn.btn-default href=new_project_build_list_path(@project)
= t('layout.build_lists.new_header')
@ -55,6 +59,7 @@
td.centered ng-hide = '::bl.project' colspan = 2
= t('layout.projects.unexisted_project')
td ng-show = '::bl.project'
a ng-href='{{::bl.project.url}}'
| {{::bl.project.name_with_owner}}
/ diff

View File

@ -40,6 +40,12 @@ div[ ng-controller='BuildListController'
p ng-show="build_list.container_status == #{ BuildList::BUILD_PUBLISH }"
= t('layout.build_lists.creating')
tr
td= t('activerecord.attributes.build_list.project')
td
a href=project_build_lists_path(@build_list.project.name_with_owner)
= @build_list.project.name_with_owner
tr
td= t('activerecord.attributes.build_list.id')
td= @build_list.id

View File

@ -8,6 +8,8 @@ en:
turned_on: on
turned_off: off
for: for
list: List
year: year

View File

@ -1,39 +1,12 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>404</title>
<link href="/assets/new_application.css" media="screen" rel="stylesheet" type="text/css">
<script cache="application" src="/assets/new_application.js"></script>
<link href='//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css' media="screen" rel="stylesheet" type="text/css">
<style type="text/css">
</style>
</head>
<body>
<nav class='navbar navbar-inverse top_menu' role='navigation'>
<div class='container-fluid'>
<!-- Brand and toggle get grouped for better mobile display -->
<div class='navbar-header'>
<button class='navbar-toggle' data-target='#top-menu-navbar-collapse' data-toggle='collapse' type='button'>
<span class='sr-only'>Toggle navigation</span>
<span class='icon-bar'></span>
<span class='icon-bar'></span>
<span class='icon-bar'></span>
</button>
<a class="navbar-brand" href="/"><img alt="ABF" src="/pics/logo-mini.png" /></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class='collapse navbar-collapse' id='top-menu-navbar-collapse'>
<ul class='nav navbar-nav'>
<li><a href="/build_lists">Мониторинг задач</a></li>
<li><a href="/advisories">Бюллетени</a></li>
<li><a href="/statistics">Статистика</a></li>
</ul>
<form accept-charset="UTF-8" action="/search" class="navbar-form navbar-left" method="get" role="search"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<div class='form-group'>
<input class="form-control" id="query" name="query" placeholder="Поиск" type="text" />
</div>
</form>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<noscript>
<div style='font-size: 12px; color: red; font-weight: bold;'>You need javascript to properly use this site</div>
</noscript>
@ -41,10 +14,6 @@
<div class='row'>
<div class='col-md-6 col-md-offset-3 text-center'>
<div class="all error404">
<div class='offset20'>
<img src="/pics/404.png" class='img-responsive'>
</div>
<div class="clearfix"></div>
<h1>Error <span>404</span></h1>
<h2>Page not found</h2>
<p class="pages">
@ -53,31 +22,8 @@
<p class="search">
Or use the search.
</p>
<div class="clearfix"></div>
</div>
</div>
</div>
</article>
<footer class='offset20'>
<ul>
<li>ROSA Лаб. © 2015</li>
<li>·</li>
<li><img alt="flag" src="/pics/flag.png" /></li>
<li>·</li>
<li><a href="http://www.rosalab.ru/about">О компании</a></li>
<li>·</li>
<li><a href="http://www.rosalab.ru/about/contacts">Контакты</a></li>
<li>·</li>
<li><a href="/terms-of-service">Условия использования</a></li>
<li>·</li>
<li><a href="/contact">Служба поддержки</a></li>
<li>·</li>
<li><a href="http://abf-doc.rosalinux.ru">API для разработчиков</a></li>
<li>·</li>
<li><a href="/abf/abf-ideas/issues">Идеи для ABF</a></li>
<li>·</li>
<li><a href="http://abf-blog.rosalinux.ru">Блог ABF</a></li>
</ul>
</footer>
</body></html>