georgia 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -5
- data/app/assets/stylesheets/georgia/components/_checkbox.scss +0 -1
- data/app/assets/stylesheets/georgia/layout/_base.scss +0 -2
- data/app/assets/stylesheets/georgia/settings/_colors.scss +2 -2
- data/app/assets/stylesheets/georgia/vendor/_select2.scss +0 -1
- data/app/controllers/georgia/pages_controller.rb +1 -1
- data/app/helpers/georgia/forms_helper.rb +2 -2
- data/app/helpers/georgia/pagination_helper.rb +2 -3
- data/app/models/georgia/slide.rb +5 -0
- data/app/presenters/georgia/pagination_presenter.rb +7 -9
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +1 -1
- data/app/views/georgia/users/sessions/new.html.erb +1 -1
- data/db/migrate/008_create_georgia_roles.rb +7 -1
- data/db/migrate/011_create_georgia_ui_sections.rb +7 -1
- data/lib/generators/georgia/install/install_generator.rb +11 -4
- data/lib/georgia.rb +1 -0
- data/lib/georgia/version.rb +1 -1
- metadata +2 -5
- data/config/initializers/revisions.rb +0 -5
- data/db/migrate/015_create_tags.rb +0 -20
- data/lib/tasks/install.rake +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: abd20d9ab3944e295ac4a7f5745aeb6bfa1a97e6
|
|
4
|
+
data.tar.gz: 6ba851a725b0976c07f71abd9f8b8163d886eddf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbc9ddd0cc66f29d279b3fc906d627d4cfa1d8e2ec871f12ec31f407937961bc569fa0704a955aff468e681104c46108235a6ad156e6cdf5ae1f5e489f9a03ba
|
|
7
|
+
data.tar.gz: b8fb78cfcde16ffd6b0604ea7f9fee64ee73f05ed8330f7de656cf2a31ff29ba3e72f6d93a2916af52b8b3265e376a043cc777536413b40b1d4741e61c67c9b6
|
data/README.md
CHANGED
|
@@ -14,12 +14,9 @@ Then run the generator to mount routes, run migrations & setup initial instances
|
|
|
14
14
|
|
|
15
15
|
rails g georgia:install
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
=== Run Foreman to start Solr
|
|
17
|
+
Start your server (`rails server`) and go to (http://localhost:3000/admin)[http://localhost:3000/admin] to get started.
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
bundle exec foreman start
|
|
19
|
+
== Testing
|
|
23
20
|
|
|
24
21
|
=== Run rspec
|
|
25
22
|
|
|
@@ -14,8 +14,8 @@ $blue: #0362fd;
|
|
|
14
14
|
|
|
15
15
|
$bg-header: #28b779;
|
|
16
16
|
$bg-header-active: #16CA7C;
|
|
17
|
-
$bg-header-main: #
|
|
18
|
-
$bg-header-main-rgba: rgba(
|
|
17
|
+
$bg-header-main: #f5f5f5;
|
|
18
|
+
$bg-header-main-rgba: rgba(245,245,245,0.9);
|
|
19
19
|
$bg-sidebar: $bg-header-main;
|
|
20
20
|
$bg-sidebar-rgba: $bg-header-main-rgba;
|
|
21
21
|
$bg-sidebar-navlist: $white;
|
|
@@ -46,7 +46,7 @@ module Georgia
|
|
|
46
46
|
Georgia::Page.update_tree(params[:page_tree]) if params[:page_tree]
|
|
47
47
|
if @page.update_attributes(params[:page])
|
|
48
48
|
respond_to do |format|
|
|
49
|
-
format.html {
|
|
49
|
+
format.html { render :settings, notice: "#{@page.title} was successfully updated." }
|
|
50
50
|
format.js { head :ok }
|
|
51
51
|
end
|
|
52
52
|
else
|
|
@@ -4,8 +4,8 @@ module Georgia
|
|
|
4
4
|
def sortable(column, title=nil)
|
|
5
5
|
title ||= column.humanize
|
|
6
6
|
direction = (column.to_s == params[:o] && params[:dir] == "asc" ? "desc" : "asc")
|
|
7
|
-
icon = direction == "asc" ? icon_tag('
|
|
8
|
-
"#{title}
|
|
7
|
+
icon = direction == "asc" ? icon_tag('caret-up') : icon_tag('caret-down')
|
|
8
|
+
"#{title} #{link_to(icon, params.merge({o: column, dir: direction}))}".html_safe
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def render_template template
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
module Georgia
|
|
2
2
|
module PaginationHelper
|
|
3
3
|
|
|
4
|
-
def pagination_tag search
|
|
5
|
-
|
|
6
|
-
Georgia::PaginationPresenter.new(self, search)
|
|
4
|
+
def pagination_tag search, options={}
|
|
5
|
+
Georgia::PaginationPresenter.new(self, search, options)
|
|
7
6
|
end
|
|
8
7
|
|
|
9
8
|
end
|
data/app/models/georgia/slide.rb
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
module Georgia
|
|
2
|
-
class PaginationPresenter
|
|
2
|
+
class PaginationPresenter < Presenter
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
delegate :content_tag, :icon_tag, :link_to_previous_page, :link_to_next_page, :link_to, to: :view_context
|
|
7
|
-
|
|
8
|
-
def initialize view_context, search
|
|
9
|
-
@view_context = view_context
|
|
4
|
+
def initialize view_context, search, options
|
|
5
|
+
super
|
|
10
6
|
@search = search
|
|
7
|
+
@options = options
|
|
11
8
|
end
|
|
12
9
|
|
|
13
10
|
def to_s
|
|
11
|
+
return unless @search and !@search.total.zero?
|
|
14
12
|
content_tag(:div, class: 'header-pagination') do
|
|
15
13
|
search_count_tag + navigation_tags
|
|
16
14
|
end
|
|
@@ -38,12 +36,12 @@ module Georgia
|
|
|
38
36
|
|
|
39
37
|
def previous_page
|
|
40
38
|
text = icon_tag('chevron-left')
|
|
41
|
-
link_to_previous_page(@search.hits, text, class: btn_class) || link_to_disabled(text)
|
|
39
|
+
link_to_previous_page(@search.hits, text, class: btn_class, params: params) || link_to_disabled(text)
|
|
42
40
|
end
|
|
43
41
|
|
|
44
42
|
def next_page
|
|
45
43
|
text = icon_tag('chevron-right')
|
|
46
|
-
link_to_next_page(@search.hits, text, class: btn_class, role: 'button') || link_to_disabled(text)
|
|
44
|
+
link_to_next_page(@search.hits, text, class: btn_class, role: 'button', params: params) || link_to_disabled(text)
|
|
47
45
|
end
|
|
48
46
|
|
|
49
47
|
def btn_class
|
|
@@ -9,7 +9,7 @@ class CkeditorAttachmentFileUploader < CarrierWave::Uploader::Base
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def extension_white_list
|
|
12
|
-
%w(doc docx odt xls ods csv pdf rar zip tar tar.gz ppt pptx)
|
|
12
|
+
%w(doc docx odt xls ods csv pdf rar zip tar tar.gz ppt pptx) + Ckeditor.image_file_types
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<h1 class='login-logo page-header'>Georgia</h1>
|
|
4
4
|
|
|
5
5
|
<% flash.each do |name, msg| %>
|
|
6
|
-
<div class="alert alert-<%= name == :notice ? "success" : "
|
|
6
|
+
<div class="alert alert-<%= name == :notice ? "success" : "danger" %>">
|
|
7
7
|
<a class="close" data-dismiss="alert">×</a>
|
|
8
8
|
<%= msg.html_safe %>
|
|
9
9
|
</div>
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
class CreateGeorgiaRoles < ActiveRecord::Migration
|
|
2
2
|
|
|
3
|
-
def
|
|
3
|
+
def up
|
|
4
4
|
create_table :georgia_roles do |t|
|
|
5
5
|
t.string :name
|
|
6
6
|
t.timestamps
|
|
7
7
|
end
|
|
8
|
+
Georgia::Role.create(name: 'Admin')
|
|
9
|
+
Georgia::Role.create(name: 'Editor')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def down
|
|
13
|
+
drop_table :georgia_roles
|
|
8
14
|
end
|
|
9
15
|
|
|
10
16
|
end
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
class CreateGeorgiaUiSections < ActiveRecord::Migration
|
|
2
2
|
|
|
3
|
-
def
|
|
3
|
+
def up
|
|
4
4
|
create_table :georgia_ui_sections do |t|
|
|
5
5
|
t.string :name
|
|
6
6
|
end
|
|
7
|
+
Georgia::UiSection.create(name: 'Footer')
|
|
8
|
+
Georgia::UiSection.create(name: 'Sidebar')
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def down
|
|
12
|
+
drop_table :georgia_ui_sections
|
|
7
13
|
end
|
|
8
14
|
|
|
9
15
|
end
|
|
@@ -33,6 +33,17 @@ module Georgia
|
|
|
33
33
|
rake "db:migrate"
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def create_admin_user
|
|
37
|
+
say("You're almost done. You need an admin user to get started.", :yellow)
|
|
38
|
+
first_name = ask("First name:")
|
|
39
|
+
last_name = ask("Last name:")
|
|
40
|
+
email = ask("Email:")
|
|
41
|
+
password = ask("Password:")
|
|
42
|
+
Georgia::User.create(first_name: first_name, last_name: last_name, email: email, password: password, password_confirmation: password) do |user|
|
|
43
|
+
user.roles << Georgia::Role.all
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
36
47
|
def copy_templates
|
|
37
48
|
template "config/initializers/georgia.rb"
|
|
38
49
|
template "app/controllers/pages_controller.rb"
|
|
@@ -47,10 +58,6 @@ module Georgia
|
|
|
47
58
|
run "bundle"
|
|
48
59
|
end
|
|
49
60
|
|
|
50
|
-
def bootstrap
|
|
51
|
-
rake 'georgia:install'
|
|
52
|
-
end
|
|
53
|
-
|
|
54
61
|
def show_readme
|
|
55
62
|
readme "README"
|
|
56
63
|
end
|
data/lib/georgia.rb
CHANGED
data/lib/georgia/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: georgia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mathieu Gagné
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-01-
|
|
11
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -783,12 +783,10 @@ files:
|
|
|
783
783
|
- config/locales/georgia.en.yml
|
|
784
784
|
- config/initializers/ckeditor.rb
|
|
785
785
|
- config/initializers/acts_as_taggable_on.rb
|
|
786
|
-
- config/initializers/revisions.rb
|
|
787
786
|
- config/initializers/inflections.rb
|
|
788
787
|
- config/initializers/devise.rb
|
|
789
788
|
- config/initializers/simple_form.rb
|
|
790
789
|
- db/migrate/006_create_georgia_pages.rb
|
|
791
|
-
- db/migrate/015_create_tags.rb
|
|
792
790
|
- db/migrate/004_create_georgia_menus.rb
|
|
793
791
|
- db/migrate/005_create_georgia_messages.rb
|
|
794
792
|
- db/migrate/003_create_georgia_links.rb
|
|
@@ -804,7 +802,6 @@ files:
|
|
|
804
802
|
- db/migrate/014_create_roles_users.rb
|
|
805
803
|
- lib/tasks/solr.rake
|
|
806
804
|
- lib/tasks/sidekiq.rake
|
|
807
|
-
- lib/tasks/install.rake
|
|
808
805
|
- lib/tasks/georgia.rake
|
|
809
806
|
- lib/tasks/upgrade.rake
|
|
810
807
|
- lib/tasks/assets.rake
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
class CreateTags < ActiveRecord::Migration
|
|
2
|
-
|
|
3
|
-
def change
|
|
4
|
-
create_table :tags do |t|
|
|
5
|
-
t.string :name
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
create_table :taggings do |t|
|
|
9
|
-
t.references :tag
|
|
10
|
-
t.references :taggable, :polymorphic => true
|
|
11
|
-
t.references :tagger, :polymorphic => true
|
|
12
|
-
t.string :context, :limit => 128
|
|
13
|
-
t.datetime :created_at
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
add_index :taggings, :tag_id
|
|
17
|
-
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
end
|
data/lib/tasks/install.rake
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
namespace :georgia do
|
|
2
|
-
|
|
3
|
-
desc 'Bootstrap Georgia with necessary instances'
|
|
4
|
-
task install: :environment do
|
|
5
|
-
|
|
6
|
-
# Create an admin user to start playing around
|
|
7
|
-
# Also creates the two main roles
|
|
8
|
-
support_user = Georgia::User.create(first_name: 'Dummy', last_name: 'Admin', email: 'admin@dummy.com', password: 'motion11', password_confirmation: 'motion11') do |user|
|
|
9
|
-
user.roles << Georgia::Role.create(name: 'Admin')
|
|
10
|
-
user.roles << Georgia::Role.create(name: 'Editor')
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
# Creates the default main UI sections
|
|
14
|
-
Georgia::UiSection.create(name: 'Footer')
|
|
15
|
-
Georgia::UiSection.create(name: 'Sidebar')
|
|
16
|
-
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
end
|