Skip to content

Commit

Permalink
Merge branch 'redesign'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bramjetten committed Jul 12, 2016
2 parents bc00689 + 64bd848 commit a8250bd
Show file tree
Hide file tree
Showing 35 changed files with 386 additions and 387 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ group :development, :test do
gem 'quiet_assets'
gem 'letter_opener'
gem 'brakeman'
gem 'spina-template'
gem 'spina-template', github: 'denkGroot/Spina-template'
gem 'bcrypt'
gem 'minitest-reporters'
gem 'guard'
Expand Down
82 changes: 46 additions & 36 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
GIT
remote: git://github.com/denkGroot/Spina-template.git
revision: 519845e4fc2673d7ed8dd95a50e1d1179c9f4288
specs:
spina-template (0.3.4)
bourbon (~> 3.2)
coffee-rails
fontcustom (~> 1.3)
jquery-fileupload-rails
neat (~> 1.5)

PATH
remote: .
specs:
spina (0.9.0)
ancestry
bcrypt
breadcrumbs_on_rails
cancan
cancancan
carrierwave
coffee-rails
filters_spam
Expand All @@ -19,7 +30,7 @@ PATH
rails (>= 4.0)
sass-rails
spina-template
turbolinks
turbolinks (~> 5.0.0.beta)

GEM
remote: http://rubygems.org/
Expand Down Expand Up @@ -86,30 +97,31 @@ GEM
terminal-table (~> 1.4)
breadcrumbs_on_rails (2.3.1)
builder (3.2.2)
cancan (1.6.10)
carrierwave (0.11.0)
cancancan (1.15.0)
carrierwave (0.11.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
mimemagic (>= 0.3.0)
celluloid (0.16.0)
timers (~> 4.0.0)
codeclimate-test-reporter (0.4.8)
simplecov (>= 0.7.1, < 1.0.0)
coderay (1.1.0)
coffee-rails (4.1.1)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.1)
concurrent-ruby (1.0.2)
docile (1.1.5)
erubis (2.7.0)
execjs (2.6.0)
execjs (2.7.0)
fastercsv (1.5.5)
ffi (1.9.10)
ffi (1.9.14)
figaro (1.1.1)
thor (~> 0.14)
filters_spam (0.5)
Expand Down Expand Up @@ -146,14 +158,14 @@ GEM
html2haml (>= 1.0.1)
railties (>= 4.0.1)
highline (1.7.8)
hitimes (1.2.3)
hitimes (1.2.4)
html2haml (2.0.0)
erubis (~> 2.7.0)
haml (~> 4.0.0)
nokogiri (~> 1.6.0)
ruby_parser (~> 3.5)
i18n (0.7.0)
jquery-fileupload-rails (0.4.6)
jquery-fileupload-rails (0.4.7)
actionpack (>= 3.1)
railties (>= 3.1)
sass (>= 3.2)
Expand All @@ -162,7 +174,7 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
kaminari (0.16.3)
kaminari (0.17.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
launchy (2.4.3)
Expand All @@ -179,28 +191,31 @@ GEM
mail (2.6.4)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0221)
mime-types-data (3.2016.0521)
mimemagic (0.3.1)
mini_magick (4.5.1)
mini_portile2 (2.0.0)
minitest (5.8.3)
mini_portile2 (2.1.0)
minitest (5.9.0)
minitest-reporters (1.1.7)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
multi_json (1.11.2)
neat (1.5.1)
bourbon (>= 3.1)
sass (~> 3.2.19)
neat (1.8.0)
sass (>= 3.3)
thor (~> 0.19)
nenv (0.2.0)
nokogiri (1.6.7.1)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
notiffany (0.0.8)
nenv (~> 0.1)
shellany (~> 0.0)
pg (0.18.4)
pkg-config (1.1.7)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
Expand Down Expand Up @@ -228,16 +243,16 @@ GEM
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.5)
actionpack (= 4.2.5)
activesupport (= 4.2.5)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.1.2)
rake (11.2.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.5)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
ruby-progressbar (1.7.5)
ruby2ruby (2.2.0)
Expand All @@ -246,7 +261,7 @@ GEM
ruby_parser (3.7.2)
sexp_processor (~> 4.1)
safe_yaml (1.0.4)
sass (3.2.19)
sass (3.4.22)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
Expand All @@ -264,13 +279,7 @@ GEM
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
slop (3.6.0)
spina-template (0.3.3)
bourbon (~> 3.2)
coffee-rails
fontcustom (~> 1.3)
jquery-fileupload-rails
neat (~> 1.5)
sprockets (3.6.0)
sprockets (3.6.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.0.4)
Expand All @@ -284,8 +293,9 @@ GEM
tilt (1.4.1)
timers (4.0.4)
hitimes
turbolinks (2.5.3)
coffee-rails
turbolinks (5.0.0)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)

Expand All @@ -306,7 +316,7 @@ DEPENDENCIES
pg
quiet_assets
spina!
spina-template
spina-template!

BUNDLED WITH
1.11.2
1.12.4
2 changes: 1 addition & 1 deletion app/assets/javascripts/spina/admin/account.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ready = ->
layout_parts = $('.account-theme').data('layout-parts')
show_layout_parts(layout_parts)

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

$(document).on 'change', '.account-theme select', ->
layout_parts = $(this).find('option:selected').data('layout-parts').split(" ")
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/spina/admin/pages.js.coffee.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ready = ->
id = $(this).data('structure-item-id')
$(".structure_form_pane_#{id}_position").val(index)

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

# Change templates makes page parts appear and disappear
$(document).on 'change', '.page-template select', ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Spina.InfiniteScroll
$.fn.infiniteScroll = () ->
Spina.InfiniteScroll.init(this)

$(document).on 'page:change', ->
$(document).on 'turbolinks:load', ->
$(window).off('scroll.infiniteScroll')
$('#main, #overlay section').off('scroll.infiniteScroll')
4 changes: 2 additions & 2 deletions app/assets/javascripts/spina/admin/spina.scaffold.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ class Spina.Scaffold
$.fn.enhance = () ->
Spina.Scaffold.enhance(this)

$(document).on 'page:change', ->
Spina.Scaffold.init()
$(document).on 'turbolinks:load', ->
Spina.Scaffold.init()
2 changes: 0 additions & 2 deletions app/controllers/spina/admin/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ class AccountsController < AdminController

authorize_resource class: Account

layout "spina/admin/settings"

def edit
add_breadcrumb I18n.t('spina.preferences.account'), spina.edit_admin_account_path
end
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/spina/admin/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ class AdminController < ::Spina::ApplicationController
before_action :set_admin_locale
before_action :authorize_user

layout 'spina/admin/application'

def current_admin_path
request.fullpath[%r{/#{ Spina.config.backend_path }(.*)}, 1]
end
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/spina/admin/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ class PagesController < AdminController

authorize_resource class: Page

layout "spina/admin/website"

def index
redirect_to admin_pages_path unless current_admin_path.starts_with?('/pages')
@pages = Page.active.sorted.roots
end

Expand Down
4 changes: 4 additions & 0 deletions app/controllers/spina/admin/photos_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ def index
@photo = Photo.new
end

def media_library
redirect_to spina.admin_photos_path
end

def create
@photo = Photo.create!(photo_params)
respond_to do |format|
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/spina/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ class UsersController < AdminController

authorize_resource class: User

layout "spina/admin/settings"

def index
@users = User.all
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
!!!
%html{lang: I18n.locale}
%head
%meta{charset: 'utf-8'}
Expand All @@ -7,28 +8,22 @@
%title Spina

/ Stylesheet
= stylesheet_link_tag 'spina/admin/application'
= stylesheet_link_tag 'spina/admin/application', data: {turbolinks_track: true}

/[if lt IE 9]
= javascript_include_tag '//html5shiv.googlecode.com/svn/trunk/html5.js'
= javascript_include_tag '//html5shiv.googlecode.com/svn/trunk/html5.js', data: {turbolinks_track: true}

/ JavaScript
= javascript_include_tag 'spina/admin/application'
= javascript_include_tag 'spina/admin/application', data: {turbolinks_track: true}
= yield(:plugin_stylesheets)

%body
= render 'spina/admin/shared/primary_navigation'
= yield(:secondary_navigation)

%section#main
%header#main_content_header
= yield(:permanent_notice)
= yield(:permanent_notice)

= yield(:header_actions) if content_for?(:header_actions)
.breadcrumbs= render_breadcrumbs separator: '<div class="divider"></div>'
= yield(:tertiary_navigation)

= render 'spina/admin/shared/notifications'
= render 'spina/admin/shared/notifications'

= content_for?(:application) ? yield(:application) : yield

Expand Down
20 changes: 11 additions & 9 deletions app/views/layouts/spina/admin/media_library.html.haml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
- content_for(:tertiary_navigation) do
%nav.tabs
%ul
%li{class: ('active' if controller_name == 'photos')}
= link_to t('spina.media_library.photos'), spina.admin_photos_path
%li{class: ('active' if controller_name == 'attachments')}
= link_to t('spina.media_library.attachments'), spina.admin_attachments_path
- content_for :application do
%header#header
= render partial: 'spina/admin/shared/breadcrumbs'

%nav#secondary.tabs
%ul
%li{class: ('active' if controller_name == 'photos')}
= link_to t('spina.media_library.photos'), spina.admin_photos_path
%li{class: ('active' if controller_name == 'attachments')}
= link_to t('spina.media_library.attachments'), spina.admin_attachments_path

- content_for :website do
= yield

= render template: 'layouts/spina/admin/website'
= render template: "layouts/spina/admin/admin"
Loading

0 comments on commit a8250bd

Please sign in to comment.