Skip to content

Commit

Permalink
KBP-180 #time 3h - Fontawesome version was updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdibayhan committed Dec 11, 2017
1 parent 2abdbfc commit 9b61161
Show file tree
Hide file tree
Showing 22 changed files with 77 additions and 77 deletions.
3 changes: 0 additions & 3 deletions lib/cybele/helpers/app_files/view_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ def add_required_view_gems
# Add breadcrumb gem
append_file('Gemfile', template_content('app_files/breadcrumb_Gemfile.erb'))

# Add fontawesome gem
append_file('Gemfile', template_content('app_files/fontawesome_Gemfile.erb'))

# Add jquery gem
append_file('Gemfile', template_content('app_files/jquery_Gemfile.erb'))
end
Expand Down
9 changes: 7 additions & 2 deletions templates/app_files/app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var ready = function(){
});

$(function () {
$('[data-toggle="tooltip"]').tooltip()
$('[data-toggle="tooltip"]').tooltip();
});

$("[data-mask]").each(function(index, element) {
Expand All @@ -48,7 +48,12 @@ var ready = function(){
});
};

$(document).on('page:load', ready);
$(document).on('turbolinks:load', function () {
ready();
var script = document.createElement("script");
script.src = "https://use.fontawesome.com/releases/v5.0.1/js/all.js";
document.head.appendChild(script);
});

document.addEventListener("turbolinks:load", ready)

Expand Down
13 changes: 8 additions & 5 deletions templates/app_files/app/assets/javascripts/hq/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
//= require nprogress

var ready = function(){
App.ready();

$('.table').footable();

$('.datetimepicker').datetimepicker({
Expand All @@ -35,7 +33,7 @@ var ready = function(){
});

$(function () {
$('[data-toggle="tooltip"]').tooltip()
$('[data-toggle="tooltip"]').tooltip();
});

$("[data-mask]").each(function(index, element) {
Expand All @@ -49,9 +47,14 @@ var ready = function(){
});
};

$(document).on('page:load', ready);
document.addEventListener("turbolinks:load", ready);

document.addEventListener("turbolinks:load", ready)
$(document).on('turbolinks:load', function () {
ready();
var script = document.createElement("script");
script.src = "https://use.fontawesome.com/releases/v5.0.1/js/all.js";
document.head.appendChild(script);
});

$(window).on('page:load', ready);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@
.list-group-item
padding: .75rem 1.25rem
&[aria-expanded="false"]::after
content: " \f0d7"
font-family: FontAwesome
content: '>'
display: inline
text-align: right
padding-left: 5px
&[aria-expanded="true"]
background-color: #222
&::after
content: " \f0da"
font-family: FontAwesome
content: '<'
display: inline
text-align: right
padding-left: 5px
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class User::ApplicationController < ApplicationController
layout 'application'
before_filter :set_audit_user, :set_user_time_zone
before_action :set_audit_user, :set_user_time_zone
before_action :authenticate_user!

protected
Expand Down
10 changes: 5 additions & 5 deletions templates/app_files/app/views/hq/admins/_admin.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
%td= admin.is_active ? t('view.active') : t('view.passive')
%td.action
= link_to([:hq, admin], class: 'btn btn-success btn-sm', data: { toggle: :tooltip}, title: t('view.tooltips.zoom')) do
%i.fa.fa-search-plus
%i.fas.fa-search-plus
= link_to(edit_hq_admin_path(admin) , class: 'btn btn-info btn-sm', data: { toggle: :tooltip }, title: t('view.tooltips.edit')) do
%i.fa.fa-edit
%i.fas.fa-edit
- if admin.id != current_admin.id
= link_to([:hq, admin], class: 'btn btn-danger btn-sm', method: :delete, data: { confirm: t('view.tooltips.are_you_sure'), toggle: :tooltip }, title: t('view.tooltips.delete')) do
%i.fa.fa-trash
%i.fas.fa-trash
- if admin.is_active
= link_to(toggle_is_active_hq_admin_path(admin), class: 'btn btn-danger btn-sm', method: :post, data: { toggle: :tooltip}, title: t('view.make_passive') ) do
%i.fa.fa-ban
%i.fas.fa-ban
- else
= link_to(toggle_is_active_hq_admin_path(admin), class: 'btn btn-info btn-sm', method: :post, data: { toggle: :tooltip}, title: t('view.make_active')) do
%i.fa.fa-check
%i.fas.fa-check
2 changes: 1 addition & 1 deletion templates/app_files/app/views/hq/admins/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.card
.card-header
%i.fa.fa-edit
%i.fas.fa-edit
= yield :form_title
.card-body
= simple_form_for([:hq, @admin], validate: true) do |f|
Expand Down
6 changes: 3 additions & 3 deletions templates/app_files/app/views/hq/admins/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
- content_for :toolbar do
= link_to new_hq_admin_path, class: 'btn btn-default btn-primary' do
%i.fa.fa-plus
%i.fas.fa-plus
= t('view.actions.new', resource_name: Admin.model_name.human)

.card
.card-header
%i.fa.fa-table
%i.fas.fa-table
= t('activerecord.models.admins')
.float-right
.btn-group
%a.btn{href: hq_admins_path, data: {toggle: 'tooltip'}, title: t('view.reload')}
%i.fa.fa-refresh
%i.fas.fa-sync
.badge.badge-pill.badge-secondary= @admins.total_entries
=blankable(@admins)
.card-footer
Expand Down
8 changes: 4 additions & 4 deletions templates/app_files/app/views/hq/audits/_list.html.haml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.card-header
%i.fa.fa-list
%i.fas.fa-list
= t('activerecord.models.audits')
.float-right
%a.btn{href: hq_audits_path, data: {toggle: 'toolbar-tooltip'}, title: t('view.reload')}
%i.fa.fa-refresh
%i.fas.fa-sync
.badge.badge-pill.badge-secondary= @audits.total_entries
.card-body.filters
= render 'filters'
Expand All @@ -15,7 +15,7 @@
%th= sort_link(@search, :user_id, t('activerecord.attributes.audits.user'))
%th{ data: { breakpoints: 'xs sm' }}= sort_link(@search, :auditable_type, t('activerecord.attributes.audits.auditable_type'))
%th{ data: { breakpoints: 'xs sm' }}= sort_link(@search, :auditable_id, t('activerecord.attributes.audits.auditable_id'))
%th{ data: { breakpoints: 'xs sm' }}= sort_link(@search, :auditable_id, t('activerecord.attributes.audits.created_at'))
%th{ data: { breakpoints: 'xs sm' }}= sort_link(@search, :created_at, t('activerecord.attributes.audits.created_at'))
%th{ data: { breakpoints: 'xs sm' }}= sort_link(@search, :action, t('activerecord.attributes.audits.action'))
%th.actions{ data: { breakpoints: 'xs' }}
= t('view.table_actions')
Expand All @@ -32,4 +32,4 @@
%td= t("actions.#{audit.action}")
%td.actions
= link_to(hq_audit_path(id: audit), class: 'btn btn-success btn-sm', 'data-toggle' => 'tooltip', title: t('view.tooltips.zoom')) do
%i.fa.fa-eye
%i.fas.fa-eye
4 changes: 2 additions & 2 deletions templates/app_files/app/views/hq/registrations/edit.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.card
.card-header
%i.fa.fa-edit
= t('devise.registration.edit.title', model: resource.class.model_name.human)
%i.fas.fa-edit
= t('devise.registration.edit.title', model: resource.class.model_name.human)
.card-body
= simple_form_for(resource, as: resource_name, url: admin_registration_path, html: { method: :put }) do |f|
= f.error_notification
Expand Down
2 changes: 1 addition & 1 deletion templates/app_files/app/views/hq/users/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.card
.card-header
%i.fa.fa-edit
%i.fas.fa-edit
= yield :form_title
.card-body
= simple_form_for([:hq, @user], validate: true) do |f|
Expand Down
10 changes: 5 additions & 5 deletions templates/app_files/app/views/hq/users/_user.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
= link_to([:hq, user], class: 'btn btn-success btn-sm',
data: { toggle: :tooltip},
title: t('view.tooltips.zoom')) do
%i.fa.fa-search-plus
%i.fas.fa-search-plus
= link_to(edit_hq_user_path(user) , class: 'btn btn-info btn-sm',
data: { toggle: :tooltip },
title: t('view.tooltips.edit')) do
%i.fa.fa-edit
%i.fas.fa-edit
= link_to([:hq, user], class: 'btn btn-danger btn-sm', method: :delete,
data: { confirm: t('view.tooltips.are_you_sure'), toggle: :tooltip },
title: t('view.tooltips.delete')) do
%i.fa.fa-trash
%i.fas.fa-trash
- if user.is_active
= link_to(toggle_is_active_hq_user_path(user), class: 'btn btn-danger btn-sm', method: :post,
data: { toggle: :tooltip},
title: t('view.make_passive') ) do
%i.fa.fa-ban
%i.fas.fa-ban
- else
= link_to(toggle_is_active_hq_user_path(user), class: 'btn btn-info btn-sm', method: :post,
data: { toggle: :tooltip},
title: t('view.make_active')) do
%i.fa.fa-check
%i.fas.fa-check
6 changes: 3 additions & 3 deletions templates/app_files/app/views/hq/users/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
- content_for :toolbar do
= link_to new_hq_user_path, class: 'btn btn-default btn-primary' do
%i.fa.fa-plus
%i.fas.fa-plus
= t('view.actions.new', resource_name: User.model_name.human)

.card
.card-header
%i.fa.fa-table
%i.fas.fa-table
= t('activerecord.models.users')
.float-right
.btn-group
%a.btn{href: hq_users_path, data: {toggle: 'tooltip'}, title: t('view.reload')}
%i.fa.fa-refresh
%i.fas.fa-refresh
.badge.badge-pill.badge-secondary= @users.total_entries
=blankable(@users)
.card-footer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
= csrf_meta_tags

/ Stylesheets (Don't change include order)
= stylesheet_link_tag 'hq/application',
'//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css',
media: 'all', 'data-turbolinks-track': 'reload'
= stylesheet_link_tag 'hq/application', media: 'all', 'data-turbolinks-track': 'reload'

/ Javascripts
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js',
Expand Down
8 changes: 5 additions & 3 deletions templates/app_files/app/views/layouts/hq/login.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
%link(rel="shortcut icon" href="/images/favicon.png")

/ Stylesheets (Don't change include order)
= stylesheet_link_tag 'hq/application',
'//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css',
media: 'all', 'data-turbolinks-track' => true
= stylesheet_link_tag 'hq/application', media: 'all', 'data-turbolinks-track': 'reload'

/ Javascripts
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js',
'hq/application', 'data-turbolinks-track': 'reload'
= yield :head

%body.login
Expand Down
32 changes: 16 additions & 16 deletions templates/app_files/app/views/layouts/hq/partials/_dock.html.haml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#sidebar.col-md-2.float-left.col-1.pl-0.pr-0.collapse.width.show
.list-group.border-0.card.text-center.text-md-left
%a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", href: hq_dashboard_index_path}
%i.fa.fa-dashboard
%i.fas.fa-home
%span.d-none.d-md-inline= t('view.dock.dashboard')
%a.list-group-item.d-inline-block.collapsed{"aria-expanded" => "false", "data-parent" => "#sidebar", "data-toggle" => "collapse", href: "#menu1"}
%i.fa.fa-list
%i.fas.fa-list
%span.d-none.d-md-inline
= t('view.dock.system_users')
#menu1.collapse
%a.list-group-item{"data-parent" => "#menu1", href: hq_admins_path}
%i.fa.fa-users
%i.fas.fa-users
= t('activerecord.models.admins')
%a.list-group-item{"data-parent" => "#menu1", href: hq_users_path}
%i.fa.fa-users
%i.fas.fa-users
= t('activerecord.models.users')


Expand All @@ -21,7 +21,7 @@
-# #sidebar.col-md-3.float-left.col-1.pl-0.pr-0.collapse.width.show
-# .list-group.border-0.card.text-center.text-md-left
-# %a.list-group-item.d-inline-block.collapsed{"aria-expanded" => "false", "data-parent" => "#sidebar", "data-toggle" => "collapse", :href => "#menu1"}
-# %i.fa.fa-dashboard
-# %i.fas.fa-home
-# %span.d-none.d-md-inline Item 1
-# #menu1.collapse
-# %a.list-group-item{"aria-expanded" => "false", "data-toggle" => "collapse", :href => "#menu1sub1"} Subitem 1
Expand All @@ -40,10 +40,10 @@
-# %a.list-group-item{"data-parent" => "#menu1", :href => "#"} Subitem 2
-# %a.list-group-item{"data-parent" => "#menu1", :href => "#"} Subitem 3
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-film
-# %i.fas.fa-film
-# %span.d-none.d-md-inline Item 2
-# %a.list-group-item.d-inline-block.collapsed{"aria-expanded" => "false", "data-parent" => "#sidebar", "data-toggle" => "collapse", :href => "#menu3"}
-# %i.fa.fa-book
-# %i.fas.fa-book
-# %span.d-none.d-md-inline Item 3
-# #menu3.collapse
-# %a.list-group-item{"data-parent" => "#menu3", :href => "#"} 3.1
Expand All @@ -54,29 +54,29 @@
-# %a.list-group-item{"data-parent" => "#menu3sub2", :href => "#"} 3.2 c
-# %a.list-group-item{"data-parent" => "#menu3", :href => "#"} 3.3
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-heart
-# %i.fas.fa-heart
-# %span.d-none.d-md-inline Item 4
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-list
-# %i.fas.fa-list
-# %span.d-none.d-md-inline Item 5
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-clock-o
-# %i.fas.fa-clock-o
-# %span.d-none.d-md-inline Link
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-th
-# %i.fas.fa-th
-# %span.d-none.d-md-inline Link
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-gear
-# %i.fas.fa-gear
-# %span.d-none.d-md-inline Link
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-calendar
-# %i.fas.fa-calendar
-# %span.d-none.d-md-inline Link
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-envelope
-# %i.fas.fa-envelope
-# %span.d-none.d-md-inline Link
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-bar-chart-o
-# %i.fas.fa-bar-chart-o
-# %span.d-none.d-md-inline Link
-# %a.list-group-item.d-inline-block.collapsed{"data-parent" => "#sidebar", :href => "#"}
-# %i.fa.fa-star
-# %i.fas.fa-star
-# %span.d-none.d-md-inline Link
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%nav.navbar.navbar-expand-lg.navbar-dark.bg-dark
%a.navbar-brand{href: hq_dashboard_index_path}
%i.fa.fa-coffee
%i.fas.fa-coffee
= t('view.navbar.admin_portal')
%button.navbar-toggler{"aria-controls" => "navbarNavDropdown", "aria-expanded" => "false", "aria-label" => "Toggle navigation", "data-target" => "#navbarNavDropdown", "data-toggle" => "collapse", :type => "button"}
%span.navbar-toggler-icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
- key = 'success'
- if key.to_s == 'alert'
- key = 'danger'
%div{:class => "alert alert-dismissable alert-#{key}"}
%div{class: "alert alert-dismissable alert-#{key}"}
- if key.to_s == 'danger' || key.to_s == 'warning'
%i.fa.fa-exclamation-triangle.fs-25
%i.fas.fa-exclamation-triangle.fa-lg

- else
%i.fa.fa-smile-o.fs-25{:style => 'padding: 0px 5px;'}
%i.far.fa-smile.fa-lg{:style => 'padding: 0px 5px;'}
= value
Loading

0 comments on commit 9b61161

Please sign in to comment.