From a7fcb8708e5639c57c5d90fffe0c9d8a4e9d54d9 Mon Sep 17 00:00:00 2001 From: Wedge Date: Mon, 2 May 2016 16:06:29 +0300 Subject: [PATCH] Move build list items around --- app/views/projects/build_lists/new.html.slim | 2 +- app/views/projects/build_lists/show.html.slim | 12 +- .../projects/projects/dashboard.html.slim | 117 +++++++++--------- 3 files changed, 65 insertions(+), 66 deletions(-) diff --git a/app/views/projects/build_lists/new.html.slim b/app/views/projects/build_lists/new.html.slim index 3b670544a..ec086aa89 100644 --- a/app/views/projects/build_lists/new.html.slim +++ b/app/views/projects/build_lists/new.html.slim @@ -1,6 +1,6 @@ -set_meta_tags title: [title_object(@project), t('layout.build_lists.new_header')] .row.top-space - .col-xs-12.col-md-10.col-md-offset-1 ng-controller = 'NewBuildListController as newBuildCtrl' ng-cloak = true + .col-md-12 ng-controller = 'NewBuildListController as newBuildCtrl' ng-cloak = true rd-widget rd-widget-header title=(t('layout.build_lists.new_header') + ' | ' + title_object(@project)) rd-widget-body diff --git a/app/views/projects/build_lists/show.html.slim b/app/views/projects/build_lists/show.html.slim index 4889c0d47..40e16d93c 100644 --- a/app/views/projects/build_lists/show.html.slim +++ b/app/views/projects/build_lists/show.html.slim @@ -16,7 +16,7 @@ div[ ng-controller='BuildListController' | ) .row - .col-md-12 + div ng-class="{'col-md-6': build_list.packages || build_list.results, 'col-md-12': !build_list.packages && !build_list.results}" rd-widget rd-widget-header title=t('layout.build_lists.main_data') rd-widget-body class="no-padding" @@ -178,6 +178,10 @@ div[ ng-controller='BuildListController' rd-widget-footer = form_for @build_list, url: publish_build_list_path(@build_list), html: {class: :"form-inline"} do |f| = render 'buttons', build_list: @build_list + .col-md-6 + = render 'packages' + .top-space ng-show="build_list.packages" + = 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) } @@ -186,8 +190,4 @@ div[ ng-controller='BuildListController' .col-md-12 = render 'item_groups' - .row.top-space - .col-md-6 - = render 'packages' - .col-md-6 - = render 'shared/build_results', subject: @build_list \ No newline at end of file + .row.top-space \ No newline at end of file diff --git a/app/views/projects/projects/dashboard.html.slim b/app/views/projects/projects/dashboard.html.slim index e36f7d88d..904a5afeb 100644 --- a/app/views/projects/projects/dashboard.html.slim +++ b/app/views/projects/projects/dashboard.html.slim @@ -1,61 +1,3 @@ -.row.top-space - .col-md-6 - 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" - .table-responsive - table.table ng-cloak=true - thead - tr - th ng-show="search" = t 'dashboard.projects.name' - th ng-hide="search" = t 'dashboard.projects.last_projects' - th - th - tbody - tr ng-repeat = 'item in projects' - td - button[ ng-click = 'selectProject(item.name_with_owner)' - ng-disabled="ProjectSelectService.disable()" class="btn btn-xs btn-link"] {{::item.name_with_owner}} - td - a[ ng-href = '{{::item.new_build_list_link}}'] = t 'dashboard.projects.new_build' - td - a[ ng-href = '{{::item.edit_link}}' - ng-show='::item.edit_link' target='_blank'] = t 'project_menu.settings' - - if policy(:project).create? - rd-widget-footer - ul.nav.nav-justified - li - = link_to t('layout.projects.new'), new_project_path, target: '_blank' - .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}} - .row.top-space .col-md-12 == render 'projects/build_lists/filter' @@ -144,4 +86,61 @@ td title = '{{::bl.updated_at_utc}}' | {{::bl.updated_at | amDateFormat:'YYYY-MM-DD HH:mm' }} rd-widget-footer ng-show="total_items > per_page" - == angularjs_paginate( per_page: 'per_page' ) \ No newline at end of file + == angularjs_paginate( per_page: 'per_page' ) +.row.top-space + .col-md-6 + 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" + .table-responsive + table.table ng-cloak=true + thead + tr + th ng-show="search" = t 'dashboard.projects.name' + th ng-hide="search" = t 'dashboard.projects.last_projects' + th + th + tbody + tr ng-repeat = 'item in projects' + td + button[ ng-click = 'selectProject(item.name_with_owner)' + ng-disabled="ProjectSelectService.disable()" class="btn btn-xs btn-link"] {{::item.name_with_owner}} + td + a[ ng-href = '{{::item.new_build_list_link}}'] = t 'dashboard.projects.new_build' + td + a[ ng-href = '{{::item.edit_link}}' + ng-show='::item.edit_link' target='_blank'] = t 'project_menu.settings' + - if policy(:project).create? + rd-widget-footer + ul.nav.nav-justified + li + = link_to t('layout.projects.new'), new_project_path, target: '_blank' + .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}} \ No newline at end of file