aureus 1.3.1 → 2.1.0
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 +7 -0
- data/.gitignore +4 -1
- data/Gemfile +9 -8
- data/Gemfile.lock +105 -104
- data/README.md +80 -0
- data/Rakefile +3 -16
- data/app/assets/javascripts/aureus/index.js +78 -20
- data/app/assets/stylesheets/aureus/index.scss +3 -35
- data/app/assets/stylesheets/aureus/skin/default.scss +52 -0
- data/app/assets/stylesheets/aureus/theme.scss +7 -0
- data/app/assets/stylesheets/aureus/theme/base.scss +19 -0
- data/app/assets/stylesheets/aureus/theme/content.scss +65 -0
- data/app/assets/stylesheets/aureus/{form.scss → theme/form.scss} +27 -27
- data/app/assets/stylesheets/aureus/theme/messages.scss +16 -0
- data/app/assets/stylesheets/aureus/theme/navigation.scss +42 -0
- data/app/assets/stylesheets/aureus/theme/table.scss +121 -0
- data/app/assets/stylesheets/aureus/theme/toolbar.scss +80 -0
- data/aureus.gemspec +21 -12
- data/config.ru +10 -0
- data/lib/aureus.rb +22 -18
- data/lib/aureus/components/box.rb +58 -0
- data/lib/aureus/components/content.rb +19 -0
- data/lib/aureus/components/data_table.rb +169 -0
- data/lib/aureus/components/listing.rb +43 -0
- data/lib/aureus/components/messages.rb +27 -0
- data/lib/aureus/components/navigation.rb +48 -0
- data/lib/aureus/components/row.rb +69 -0
- data/lib/aureus/components/simple_map.rb +21 -0
- data/lib/aureus/components/toolbar.rb +124 -0
- data/lib/aureus/engine.rb +8 -2
- data/lib/aureus/helper.rb +56 -55
- data/lib/aureus/renderable.rb +4 -12
- data/lib/aureus/version.rb +2 -2
- data/lib/generators/aureus/devise_i18n/devise_i18n_generator.rb +17 -12
- data/{config → lib/generators/aureus/devise_i18n}/locales/devise_base.de.yml +0 -0
- data/{config → lib/generators/aureus/devise_i18n}/locales/devise_base.en.yml +1 -1
- data/{config → lib/generators/aureus/devise_i18n}/locales/devise_mail.de.yml +1 -1
- data/{config → lib/generators/aureus/devise_i18n}/locales/devise_mail.en.yml +1 -1
- data/{config → lib/generators/aureus/devise_i18n}/locales/devise_ui.de.yml +0 -0
- data/{config → lib/generators/aureus/devise_i18n}/locales/devise_ui.en.yml +0 -0
- data/lib/generators/aureus/devise_invitable_i18n/devise_invitable_i18n_generator.rb +25 -0
- data/lib/generators/aureus/devise_invitable_i18n/locales/devise_invitable_base.de.yml +11 -0
- data/lib/generators/aureus/devise_invitable_i18n/locales/devise_invitable_base.en.yml +11 -0
- data/lib/generators/aureus/devise_invitable_i18n/locales/devise_invitable_mail.de.yml +9 -0
- data/lib/generators/aureus/devise_invitable_i18n/locales/devise_invitable_mail.en.yml +9 -0
- data/lib/generators/aureus/devise_invitable_i18n/locales/devise_invitable_ui.de.yml +12 -0
- data/lib/generators/aureus/devise_invitable_i18n/locales/devise_invitable_ui.en.yml +12 -0
- data/lib/generators/aureus/devise_invitable_views/devise_invitable_views_generator.rb +23 -0
- data/lib/generators/aureus/devise_invitable_views/templates/devise/invitations/edit.html.haml +9 -0
- data/lib/generators/aureus/devise_invitable_views/templates/devise/invitations/new.html.haml +8 -0
- data/lib/generators/aureus/devise_invitable_views/templates/devise/mailer/invitation_instructions.html.haml +5 -0
- data/lib/generators/aureus/devise_views/devise_views_generator.rb +17 -15
- data/lib/generators/aureus/devise_views/templates/devise/confirmations/new.html.haml +5 -5
- data/lib/generators/aureus/devise_views/templates/devise/mailer/confirmation_instructions.html.haml +3 -3
- data/lib/generators/aureus/devise_views/templates/devise/mailer/reset_password_instructions.html.haml +5 -5
- data/lib/generators/aureus/devise_views/templates/devise/mailer/unlock_instructions.html.haml +4 -4
- data/lib/generators/aureus/devise_views/templates/devise/passwords/edit.html.haml +7 -7
- data/lib/generators/aureus/devise_views/templates/devise/passwords/new.html.haml +5 -5
- data/lib/generators/aureus/devise_views/templates/devise/registrations/edit.html.haml +9 -9
- data/lib/generators/aureus/devise_views/templates/devise/registrations/new.html.haml +7 -7
- data/lib/generators/aureus/devise_views/templates/devise/sessions/new.html.haml +7 -7
- data/lib/generators/aureus/devise_views/templates/devise/shared/_links.html.haml +6 -6
- data/lib/generators/aureus/devise_views/templates/devise/unlocks/new.html.haml +5 -5
- data/lib/generators/aureus/layout/layout_generator.rb +10 -10
- data/lib/generators/aureus/layout/templates/layout.html.haml +8 -8
- data/lib/generators/aureus/views/templates/views/_form.html.haml +3 -3
- data/lib/generators/aureus/views/templates/views/_item.html.haml +2 -2
- data/lib/generators/aureus/views/templates/views/_list.html.haml +8 -8
- data/lib/generators/aureus/views/templates/views/edit.html.haml +4 -4
- data/lib/generators/aureus/views/templates/views/index.html.haml +3 -3
- data/lib/generators/aureus/views/templates/views/new.html.haml +4 -4
- data/lib/generators/aureus/views/templates/views/show.html.haml +4 -4
- data/lib/generators/aureus/views/views_generator.rb +70 -68
- data/spec/controllers/all_spec.rb +19 -0
- data/spec/internal/app/assets/javascripts/application.js +9 -0
- data/spec/internal/app/assets/stylesheets/application.scss +5 -0
- data/spec/internal/app/controllers/all_controller.rb +14 -0
- data/spec/internal/app/controllers/resources_controller.rb +2 -0
- data/spec/{lib/helper → internal/app/models}/resource.rb +0 -0
- data/spec/internal/app/views/all/centered.html.haml +5 -0
- data/spec/internal/app/views/all/index.html.haml +39 -0
- data/spec/internal/app/views/layouts/application.html.haml +24 -0
- data/spec/internal/app/views/layouts/naked.html.haml +10 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +5 -0
- data/spec/internal/db/schema.rb +10 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/lib/generators/devise_i18n_spec.rb +19 -0
- data/spec/lib/generators/devise_invitable_i18n_spec.rb +19 -0
- data/spec/lib/generators/devise_invitable_views_spec.rb +19 -0
- data/spec/lib/generators/devise_views_spec.rb +25 -0
- data/spec/lib/generators/layout_spec.rb +17 -0
- data/spec/lib/generators/views_spec.rb +26 -0
- data/spec/requests/all_spec.rb +12 -0
- data/spec/spec_helper.rb +15 -0
- metadata +219 -78
- data/.rspec +0 -2
- data/Guardfile +0 -4
- data/Readme.md +0 -370
- data/TODO.md +0 -11
- data/app/assets/images/aureus/background.png +0 -0
- data/app/assets/images/aureus/topbar.png +0 -0
- data/app/assets/javascripts/aureus/defaults.js +0 -30
- data/app/assets/javascripts/aureus/extensions.js +0 -42
- data/app/assets/javascripts/aureus/functions.js +0 -67
- data/app/assets/javascripts/aureus/plugins/jquery-calendrical.js +0 -508
- data/app/assets/javascripts/aureus/plugins/jquery-datatables.js +0 -11838
- data/app/assets/javascripts/aureus/plugins/jquery-qtip.js +0 -15
- data/app/assets/stylesheets/aureus/base.scss +0 -48
- data/app/assets/stylesheets/aureus/content.scss +0 -100
- data/app/assets/stylesheets/aureus/mixins.scss +0 -43
- data/app/assets/stylesheets/aureus/navigation.scss +0 -43
- data/app/assets/stylesheets/aureus/reset.scss +0 -50
- data/app/assets/stylesheets/aureus/table.scss +0 -153
- data/app/assets/stylesheets/aureus/topbar.scss +0 -89
- data/app/assets/stylesheets/aureus/ui.scss +0 -98
- data/lib/aureus/box.rb +0 -54
- data/lib/aureus/content.rb +0 -15
- data/lib/aureus/data_table.rb +0 -148
- data/lib/aureus/listing.rb +0 -39
- data/lib/aureus/map.rb +0 -17
- data/lib/aureus/messages.rb +0 -23
- data/lib/aureus/navigation.rb +0 -42
- data/lib/aureus/row.rb +0 -65
- data/lib/aureus/toolbar.rb +0 -99
- data/spec/lib/helper/schema.rb +0 -6
- data/spec/lib/render_spec.rb +0 -16
- data/spec/lib/spec_helper.rb +0 -21
- data/spec/lib/views/box.haml +0 -14
- data/spec/lib/views/content.haml +0 -2
- data/spec/lib/views/datatable.haml +0 -11
- data/spec/lib/views/listing.haml +0 -5
- data/spec/lib/views/messages.haml +0 -2
- data/spec/lib/views/navigation.haml +0 -4
- data/spec/lib/views/row.haml +0 -28
- data/spec/lib/views/toolbar.haml +0 -11
@@ -1,19 +1,19 @@
|
|
1
1
|
module Aureus
|
2
2
|
|
3
|
-
|
3
|
+
module Generators
|
4
4
|
|
5
|
-
|
5
|
+
class LayoutGenerator < Rails::Generators::Base
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
desc 'generate an aureus layout file'
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
9
|
+
argument :name, required: true
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
def generate
|
12
|
+
copy_file 'layout.html.haml', "app/views/layouts/#{name}.html.haml"
|
13
|
+
end
|
14
14
|
|
15
|
-
|
15
|
+
end
|
16
16
|
|
17
|
-
|
17
|
+
end
|
18
18
|
|
19
19
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
!!! 5
|
2
2
|
%html
|
3
3
|
%head
|
4
|
-
%meta{ :
|
5
|
-
%title= t(
|
6
|
-
= stylesheet_link_tag
|
7
|
-
= javascript_include_tag
|
4
|
+
%meta{ charset: 'utf-8' }/
|
5
|
+
%title= t('.title')
|
6
|
+
= stylesheet_link_tag 'application'
|
7
|
+
= javascript_include_tag 'application'
|
8
8
|
= csrf_meta_tag
|
9
9
|
%body
|
10
|
-
= aureus_toolbar t(
|
10
|
+
= aureus_toolbar t('.title') do |t|
|
11
11
|
- t.left do |l|
|
12
|
-
- l.link_to t(
|
12
|
+
- l.link_to t('.root'), root_url
|
13
13
|
- t.right do |r|
|
14
|
-
- r.info
|
14
|
+
- r.info 'info'
|
15
15
|
= yield :navigation
|
16
16
|
= aureus_messages flash
|
17
|
-
= aureus_content yield
|
17
|
+
= aureus_content yield
|
@@ -1,10 +1,10 @@
|
|
1
1
|
= aureus_row do
|
2
|
-
= aureus_box t(
|
3
|
-
= aureus_datatable @{{{
|
2
|
+
= aureus_box t('.box_title') do
|
3
|
+
= aureus_datatable @{{{name_plural}}} do |t|
|
4
4
|
- t.head do |h|
|
5
|
-
{{{
|
6
|
-
- t.row do |r,{{{
|
7
|
-
{{{
|
8
|
-
- r.button :show, {{{
|
9
|
-
- r.button :edit, edit_{{{
|
10
|
-
- r.button :destroy, {{{
|
5
|
+
{{{table_heads}}}
|
6
|
+
- t.row do |r,{{{name_singular}}}|
|
7
|
+
{{{table_cells}}}
|
8
|
+
- r.button :show, {{{path_singular}}}_url({{{name_singular}}}) if can? :show, {{{name_singular}}}
|
9
|
+
- r.button :edit, edit_{{{path_singular}}}_url({{{name_singular}}}) if can? :edit, {{{name_singular}}}
|
10
|
+
- r.button :destroy, {{{path_singular}}}_url({{{name_singular}}}), confirm: t('.destroy_confirm') if can? :destroy, {{{name_singular}}}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- content_for :navigation do
|
2
2
|
= aureus_navigation do |n|
|
3
|
-
- n.title t(
|
4
|
-
- n.button link_to t(
|
5
|
-
- n.submit_form_button @{{{
|
3
|
+
- n.title t('.title')
|
4
|
+
- n.button link_to t('.button_cancel'), {{{path_plural}}}_url if can? :show, @{{{name_singular}}}
|
5
|
+
- n.submit_form_button @{{{name_singular}}}, t('.button_save') if can? :update, @{{{name_singular}}}
|
6
6
|
|
7
|
-
= render
|
7
|
+
= render 'form'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- content_for :navigation do
|
2
2
|
= aureus_navigation do |n|
|
3
|
-
- n.title t(
|
4
|
-
- n.button link_to(t(
|
3
|
+
- n.title t('.title')
|
4
|
+
- n.button link_to(t('.button_new'), new_{{{path_singular}}}_url) if can? :create, {{{model}}}
|
5
5
|
|
6
|
-
= render
|
6
|
+
= render 'list'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- content_for :navigation do
|
2
2
|
= aureus_navigation do |n|
|
3
|
-
- n.title t(
|
4
|
-
- n.button link_to(t(
|
5
|
-
- n.submit_form_button @{{{
|
3
|
+
- n.title t('.title')
|
4
|
+
- n.button link_to(t('.button_cancel'), {{{path_plural}}}_url) if can? :index, {{{model}}}
|
5
|
+
- n.submit_form_button @{{{name_singular}}}, t('.button_save') if can? :create, {{{model}}}
|
6
6
|
|
7
|
-
= render
|
7
|
+
= render 'form'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- content_for :navigation do
|
2
2
|
= aureus_navigation do |n|
|
3
|
-
- n.title t(
|
4
|
-
- n.button link_to(t(
|
5
|
-
- n.button link_to(t(
|
3
|
+
- n.title t('.title')
|
4
|
+
- n.button link_to(t('.button_edit'), edit_{{{path_singular}}}_url(@{{{name_singular}}})) if can? :update, @{{{name_singular}}}
|
5
|
+
- n.button link_to(t('.button_back'),{{{path_plural}}}_url) if can? :index, {{{model}}}
|
6
6
|
|
7
|
-
= render
|
7
|
+
= render 'item'
|
@@ -1,79 +1,81 @@
|
|
1
1
|
module Aureus
|
2
2
|
|
3
|
-
|
3
|
+
module Generators
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
class ViewsGenerator < Rails::Generators::Base
|
6
|
+
include ActiveSupport::Inflector
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
desc 'generates aures views for a existing model'
|
9
|
+
source_root File.expand_path('../templates', __FILE__)
|
10
|
+
class_option :yes, type: :boolean, default: false, description: 'do not ask'
|
11
|
+
argument :resource, type: :string, required: true
|
12
|
+
argument :controller, type: :string, required: true
|
13
|
+
argument :columns, type: :array
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
route = folder.gsub("/","_").singularize
|
15
|
+
def generate
|
16
|
+
model_name = resource.camelize
|
17
|
+
folder = controller.gsub(/Controller$/,'').underscore
|
18
|
+
target = ['app/views',folder].join '/'
|
19
|
+
namespace = folder.split('/').slice(0...-1)
|
20
|
+
model_name.constantize
|
21
|
+
controller.constantize
|
22
|
+
real_name = model_name.demodulize
|
23
|
+
name_singular = real_name.underscore.downcase
|
24
|
+
route = folder.gsub('/','_').singularize
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
}
|
39
|
-
Dir[target+"/*.haml"].each do |file|
|
40
|
-
replacements.each do |key,value|
|
41
|
-
gsub_file file, "{{{#{key}}}}", value, :verbose => false
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
26
|
+
if options[:yes] or yes?("generate views for '#{model_name}' to: '#{target}'?")
|
27
|
+
replacements = {
|
28
|
+
model: model_name,
|
29
|
+
name_singular: name_singular,
|
30
|
+
name_plural: real_name.pluralize.underscore.downcase,
|
31
|
+
path_singular: route,
|
32
|
+
path_plural: route.pluralize,
|
33
|
+
table_heads: columns.collect{ |c| "- h.text t('.column_#{c}')" }.join("\n").indent(8),
|
34
|
+
table_cells: columns.collect{ |c| "- r.cell #{name_singular}.#{c}" }.join("\n").indent(8),
|
35
|
+
entries: columns.collect{ |c| "- l.entry t('.entry_#{c}'), @#{name_singular}.#{c}" }.join("\n").indent(8),
|
36
|
+
inputs: columns.collect{ |c| "= f.input :#{c}, label: t('.field_#{c}')" }.join("\n").indent(8),
|
37
|
+
form_path: namespace.collect{ |n| "'#{n}'" }.push("@#{name_singular}").join(',')
|
38
|
+
}
|
45
39
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
"new" => { "title" => "New "+singular, "button_cancel" => "Cancel", "button_save" => "Save" },
|
54
|
-
"edit" => { "title" => "Edit "+singular, "button_cancel" => "Cancel", "button_save" => "Save" },
|
55
|
-
"form" => { "box_title" => "Details" },
|
56
|
-
"list" => { "box_title" => plural+" Listing", "destroy_confirm" => "Really want to delete the "+singular+"?" },
|
57
|
-
"show" => { "title" => singular, "button_edit" => "Edit "+singular, "button_back" => "Back" },
|
58
|
-
"item" => { "box_title" => "Details" }
|
59
|
-
}
|
60
|
-
}
|
61
|
-
columns.each do |c|
|
62
|
-
base_i18n[plural.downcase]["item"][("entry_"+c)] = c.titleize
|
63
|
-
base_i18n[plural.downcase]["list"][("column_"+c)] = c.titleize
|
64
|
-
base_i18n[plural.downcase]["form"][("field_"+c)] = c.titleize
|
65
|
-
end
|
66
|
-
namespace.reverse.each do |n|
|
67
|
-
base_i18n = { n => base_i18n }
|
68
|
-
end
|
69
|
-
base_i18n = { "en" => base_i18n }
|
70
|
-
create_file i18n_file, base_i18n.to_yaml
|
71
|
-
end
|
40
|
+
directory 'views', target do |content|
|
41
|
+
replacements.each do |key,value|
|
42
|
+
content.gsub! "{{{#{key}}}}", value
|
43
|
+
end
|
44
|
+
content
|
45
|
+
end
|
46
|
+
end
|
72
47
|
|
73
|
-
|
48
|
+
i18n_file = "config/locales/en/#{route.pluralize}.en.yml"
|
49
|
+
if options[:yes] or yes?('generate i18n file to: '+i18n_file+'?')
|
50
|
+
singular = real_name
|
51
|
+
plural = real_name.pluralize
|
52
|
+
base_i18n = {
|
53
|
+
plural.downcase => {
|
54
|
+
index: { title: plural, button_new: "Add #{singular}" },
|
55
|
+
new: { title: 'New '+singular, button_cancel: 'Cancel', button_save: 'Save' },
|
56
|
+
edit: { title: 'Edit '+singular, button_cancel: 'Cancel', button_save: 'Save' },
|
57
|
+
form: { box_title: 'Details' },
|
58
|
+
list: { box_title: plural+' Listing', destroy_confirm: "Really want to delete the #{singular}?" },
|
59
|
+
show: { title: singular, button_edit: "Edit #{singular}", button_back: 'Back' },
|
60
|
+
item: { box_title: 'Details' }
|
61
|
+
}
|
62
|
+
}
|
63
|
+
columns.each do |c|
|
64
|
+
base_i18n[plural.downcase][:item][("entry_#{c}")] = c.titleize
|
65
|
+
base_i18n[plural.downcase][:list][("column_#{c}")] = c.titleize
|
66
|
+
base_i18n[plural.downcase][:form][("field_#{c}")] = c.titleize
|
67
|
+
end
|
68
|
+
namespace.reverse.each do |n|
|
69
|
+
base_i18n = { n => base_i18n }
|
70
|
+
end
|
71
|
+
base_i18n = { en: base_i18n }
|
72
|
+
create_file i18n_file, base_i18n.deep_stringify_keys.to_yaml
|
73
|
+
end
|
74
74
|
|
75
|
-
|
75
|
+
end
|
76
76
|
|
77
|
-
|
77
|
+
end
|
78
78
|
|
79
|
-
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe AllController do
|
4
|
+
describe 'GET index' do
|
5
|
+
it 'renders the index template' do
|
6
|
+
get :index
|
7
|
+
expect(response).to render_template('index')
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe AllController do
|
13
|
+
describe 'GET centered' do
|
14
|
+
it 'renders the centered template' do
|
15
|
+
get :centered
|
16
|
+
expect(response).to render_template('centered')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class AllController < ActionController::Base
|
2
|
+
|
3
|
+
def index
|
4
|
+
flash[:notice] = 'Notice'
|
5
|
+
flash[:error] = 'Error'
|
6
|
+
flash[:alert] = 'Alert'
|
7
|
+
render :index, layout: 'application'
|
8
|
+
end
|
9
|
+
|
10
|
+
def centered
|
11
|
+
render :centered, layout: 'naked'
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
File without changes
|
@@ -0,0 +1,39 @@
|
|
1
|
+
- content_for :navigation do
|
2
|
+
= aureus_navigation do |n|
|
3
|
+
- n.title 'Navigation Title'
|
4
|
+
- n.button link_to 'Button', '#'
|
5
|
+
|
6
|
+
= aureus_row do |r|
|
7
|
+
- r.column 25 do
|
8
|
+
= aureus_box 'List' do
|
9
|
+
= aureus_listing do |l|
|
10
|
+
- l.entry 'Field 1', 'Element 1'
|
11
|
+
- l.entry 'Field 2' do
|
12
|
+
%strong Element 2
|
13
|
+
- r.column 25 do
|
14
|
+
= aureus_form [Resource.new] do |f|
|
15
|
+
= aureus_box 'Form', for: :form do |b|
|
16
|
+
- b.button link_to 'Button', '#'
|
17
|
+
- b.content do
|
18
|
+
= f.input :title
|
19
|
+
= f.action :submit
|
20
|
+
- b.foot do
|
21
|
+
The Footer
|
22
|
+
- r.column 25 do
|
23
|
+
= aureus_box 'Map' do
|
24
|
+
= aureus_simple_map longitude: 47, latitude: 38
|
25
|
+
- r.space 25
|
26
|
+
|
27
|
+
= aureus_row do
|
28
|
+
= aureus_box 'Simple Datatable' do
|
29
|
+
= aureus_datatable Resource.all do |t|
|
30
|
+
- t.head do |h|
|
31
|
+
- h.text 'Title'
|
32
|
+
- h.text 'Text'
|
33
|
+
- t.row do |r,res|
|
34
|
+
- r.identifier res.id
|
35
|
+
- r.cell res.title
|
36
|
+
- r.cell res.text
|
37
|
+
- r.button :show, 'url'
|
38
|
+
- r.button :edit, 'url'
|
39
|
+
- r.button :destroy, 'url', confirm: 'Delete user?'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%meta{ charset: 'utf-8' }/
|
5
|
+
%title Aureus
|
6
|
+
= stylesheet_link_tag 'application'
|
7
|
+
= javascript_include_tag 'application'
|
8
|
+
= csrf_meta_tag
|
9
|
+
%body
|
10
|
+
= aureus_toolbar 'Aureus' do |t|
|
11
|
+
- t.left do |l|
|
12
|
+
- l.dropdown 'Dropdown' do |d|
|
13
|
+
- d.link_to 'Element', '#'
|
14
|
+
- d.link_to 'Element', '#'
|
15
|
+
- l.info 'Info'
|
16
|
+
- t.right do |r|
|
17
|
+
- r.info 'Info'
|
18
|
+
- r.dropdown 'Dropdown' do |d|
|
19
|
+
- d.link_to 'Element', '#'
|
20
|
+
- d.link_to 'Element', '#'
|
21
|
+
- r.link_to 'Element', '#'
|
22
|
+
= yield(:navigation)
|
23
|
+
= aureus_messages flash
|
24
|
+
= aureus_content yield
|