Skip to content

Commit

Permalink
Admin title polish (#2089)
Browse files Browse the repository at this point in the history
* style

* group actions with search row

* consolidate page title to h4
  • Loading branch information
rossmoody authored Aug 6, 2019
1 parent a09217e commit 9a6238e
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 31 deletions.
26 changes: 26 additions & 0 deletions app/assets/stylesheets/admin/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
@import "colors";

// Heading and button row
.panel-heading {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 0 20px 0;
}

.action-group {
display: grid;
grid-template-columns: 2fr 1fr;
grid-gap: 32px;
align-items: center;
}

// Bootstrap overrides. Could be refined
.btn-default {
color: $braveGray-2 !important;
border: 1px solid $braveGray-7 !important;
margin: 0 8px;
}

.btn-primary {
margin: 0 4px;
}

/* header */
#header {
background: $braveGray-1;
Expand Down
12 changes: 6 additions & 6 deletions app/views/admin/channels/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ div.row
section.panel
header.panel-heading
h4= "#{params[:type]&.titlecase} Channels"
= form_tag(admin_channels_path, method: "get")
.input-group
= text_field_tag(:q, params[:q], class:'form-control')
.input-group-btn
= submit_tag("Search", class: 'btn btn-default')
.action-group
= form_tag(admin_channels_path, method: "get")
.input-group
= text_field_tag(:q, params[:q], class:'form-control')
.input-group-btn
= submit_tag("Search", class: 'btn btn-default')

= hidden_field_tag(:type, params[:type])
label
= check_box_tag('verified', 1, params[:verified].present?, class: 'checkbox')
= "Verified"

br
div.panel-body
div.adv-table
Expand Down
11 changes: 6 additions & 5 deletions app/views/admin/partners/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ div.row
header.panel-heading.partner-container
h4 Partners
= link_to "Add a Partner", new_admin_partner_path, class: "btn btn-primary btn-partner"
= form_tag(admin_partners_path, method: "get")
.input-group
= text_field_tag(:q, params[:q], class:'form-control')
.input-group-btn
= submit_tag("Search", class: 'btn btn-default')
.action-group
= form_tag(admin_partners_path, method: "get")
.input-group
= text_field_tag(:q, params[:q], class:'form-control')
.input-group-btn
= submit_tag("Search", class: 'btn btn-default')

.partner-filters
label
Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/partners/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
.notifications
.alert.alert-warning.flash = msg

h1 Add a new partner
header.panel-heading
h4 Add a new partner

= form_with url: admin_partners_path, method: :post do |f|
.form-group
Expand Down
11 changes: 5 additions & 6 deletions app/views/admin/payout_reports/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
.d-flex
h1 Payout Reports
.panel-heading
h4 Payout Reports
.ml-4
= form_tag upload_settlement_report_admin_payout_reports_path, id: "settlementForm", multipart: :true
label
= file_field_tag :file, { class: 'd-none', id: "settlementFile", accept: ".json,application/json" }
.btn.btn-primary Upload Settlement Report
.ml-4
- toggle_text = Rails.cache.fetch('payout_in_progress') ? "Remove payout in progress" : "Set payout in progress"
= form_tag toggle_payout_in_progress_admin_payout_reports_path
= submit_tag("#{toggle_text}", class: "btn btn-primary")
- toggle_text = Rails.cache.fetch('payout_in_progress') ? "Remove payout in progress" : "Set payout in progress"
= form_tag toggle_payout_in_progress_admin_payout_reports_path
= submit_tag("#{toggle_text}", class: "btn btn-primary")

javascript:
document.getElementById('settlementFile').addEventListener("change", function() {
Expand Down
11 changes: 6 additions & 5 deletions app/views/admin/publishers/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ div.row
section.panel
header.panel-heading
h4 Publishers
= form_tag(admin_publishers_path, method: "get")
.input-group
= text_field_tag(:q, params[:q], class:'form-control')
.input-group-btn
= submit_tag("Search", class: 'btn btn-default', name: nil)
.action-group
= form_tag(admin_publishers_path, method: "get")
.input-group
= text_field_tag(:q, params[:q], class:'form-control')
.input-group-btn
= submit_tag("Search", class: 'btn btn-default', name: nil)
.form-inline.mt-1
= select_tag(:status, options_for_select(PublisherStatusUpdate::ALL_STATUSES, params[:status]), include_blank: "Filter by status" , class: "form-control mr-2", onchange:"this.form.submit()")
= select_tag(:role, options_for_select(Publisher::ROLES, params[:role]), include_blank: "Filter by role" , class: "form-control", onchange: "this.form.submit()")
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/shared/_sidebar.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ aside
= nav_link "Channel", admin_stats_top_balances_path(type: Eyeshade::TopBalances::CHANNEL)
= nav_link "Owner", admin_stats_top_balances_path(type: Eyeshade::TopBalances::OWNER)
= nav_link "Uphold", admin_stats_top_balances_path(type: Eyeshade::TopBalances::UPHOLD)
= nav_link "Top Youtube Channels", admin_stats_top_youtube_channels_path
= nav_link "Top YouTube Channels", admin_stats_top_youtube_channels_path
li
a href='#' class="sidebar-toggle pull-right"
= fa_icon "chevron-down"
Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/stats/contributions/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
h2 Top Publisher Contributions
.panel-heading
h4 Top Publisher Contributions
= render partial: 'admin/stats/top_eyeshade_wallets', result: @result, publishers: @publishers, youtube_channel_details: @youtube_channel_details
3 changes: 2 additions & 1 deletion app/views/admin/stats/publisher_statistics/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
h1= "Publisher Stats"
.panel-heading
h4= "Publisher Stats"
#publisherStats

= link_to "Download as CSV", admin_stats_publisher_statistics_path(format: 'csv')
Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/stats/referrals/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
h2 Top Publisher Referrals
.panel-heading
h4 Top Publisher Referrals
= render partial: 'admin/stats/top_eyeshade_wallets', result: @result, publishers: @publishers, youtube_channel_details: @youtube_channel_details
3 changes: 2 additions & 1 deletion app/views/admin/stats/top_balances/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
h2= "Top Balances for #{params[:type].titleize}"
.panel-heading
h4= "Top Balances for #{params[:type].titleize}"

= form_tag nil, method: :get do
= hidden_field_tag "type", @type
Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/stats/top_youtube_channels/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
br
.panel-heading
h4= "Top YouTube Channels"
div.panel-body
div.adv-table
table.display.table.table-bordered.table-striped.dynamic-table id="dynamic-table"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.unattached-promo-registrations
.flex
h1 Referral Promo
hr
h4 Referral Promo
.flex
.panel.panel--double
= form_tag admin_unattached_promo_registrations_path, id: "create-referral-codes" do
Expand Down

0 comments on commit 9a6238e

Please sign in to comment.