aura 0.0.1.pre10
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.travis.yml +3 -0
- data/Gemfile +2 -0
- data/HISTORY.md +95 -0
- data/README.md +53 -0
- data/Rakefile +27 -0
- data/Scribefile +8 -0
- data/app/css/_utilities.scss +88 -0
- data/app/css/admin.scss +21 -0
- data/app/css/admin/_settings.scss +136 -0
- data/app/css/admin/chrome.scss +208 -0
- data/app/css/admin/common.scss +78 -0
- data/app/css/admin/forms.scss +342 -0
- data/app/css/admin/jquery_wysiwyg.scss +96 -0
- data/app/css/admin/loading.scss +18 -0
- data/app/css/admin/meta.scss +42 -0
- data/app/css/admin/reset.scss +46 -0
- data/app/css/admin/sections.scss +79 -0
- data/app/css/admin/setup.scss +22 -0
- data/app/css/admin/sidebar.scss +136 -0
- data/app/css/admin/slug.scss +78 -0
- data/app/css/admin/uiscreen.scss +22 -0
- data/app/css/admin/wysiwyg_field.scss +11 -0
- data/app/css/admin_watermark.scss +23 -0
- data/app/css/default_home_page.scss +13 -0
- data/app/css/login.scss +47 -0
- data/app/helpers/admin_helpers.rb +59 -0
- data/app/helpers/flash_helpers.rb +86 -0
- data/app/helpers/form_builder_helpers.rb +9 -0
- data/app/helpers/html_helpers.rb +27 -0
- data/app/helpers/jquery_helpers.rb +26 -0
- data/app/helpers/main_helpers.rb +67 -0
- data/app/helpers/page_helpers.rb +92 -0
- data/app/helpers/template_helpers.rb +94 -0
- data/app/helpers/user_helpers.rb +45 -0
- data/app/init/admin.rb +34 -0
- data/app/init/extensions.rb +18 -0
- data/app/init/pistol.rb +11 -0
- data/app/init/sequel.rb +11 -0
- data/app/main.rb +106 -0
- data/app/migrations/page.rb +29 -0
- data/app/migrations/settings.rb +11 -0
- data/app/migrations/user.rb +13 -0
- data/app/models/page.rb +116 -0
- data/app/models/page_seed.rb +47 -0
- data/app/models/settings.rb +59 -0
- data/app/models/user.rb +60 -0
- data/app/routes/admin.rb +44 -0
- data/app/routes/css_js.rb +53 -0
- data/app/routes/design_tests.rb +15 -0
- data/app/routes/editor.rb +152 -0
- data/app/routes/site.rb +33 -0
- data/app/routes/user.rb +48 -0
- data/app/views/admin/_back_to_dashboard.haml +3 -0
- data/app/views/admin/dashboard.haml +46 -0
- data/app/views/admin/layout.haml +73 -0
- data/app/views/admin/settings.haml +40 -0
- data/app/views/admin/settings/database.haml +42 -0
- data/app/views/base/crumbs.haml +50 -0
- data/app/views/base/delete.haml +19 -0
- data/app/views/base/edit.haml +61 -0
- data/app/views/base/errors.haml +10 -0
- data/app/views/base/form.haml +11 -0
- data/app/views/base/list.haml +14 -0
- data/app/views/base/list_actions.haml +4 -0
- data/app/views/base/list_item.haml +7 -0
- data/app/views/base/nav.haml +36 -0
- data/app/views/base/new.haml +36 -0
- data/app/views/base/preview.haml +28 -0
- data/app/views/base/tabs.haml +12 -0
- data/app/views/default_home_page.haml +15 -0
- data/app/views/design_tests/admin_styles.haml +58 -0
- data/app/views/form_builder/builder.haml +29 -0
- data/app/views/page/edit.haml +29 -0
- data/app/views/page/form.haml +22 -0
- data/app/views/page/meta_form.haml +22 -0
- data/app/views/page/new.haml +26 -0
- data/app/views/user/edit.haml +52 -0
- data/app/views/user/form.haml +43 -0
- data/app/views/user/list.haml +11 -0
- data/app/views/user/login.haml +33 -0
- data/app/views/user/new.haml +25 -0
- data/app/views/user/welcome.haml +29 -0
- data/app/views/watermark/watermark.haml +16 -0
- data/aura.gemspec +36 -0
- data/bin/aura +8 -0
- data/config/database.rb +12 -0
- data/config/extensions.rb +5 -0
- data/config/scss.rb +14 -0
- data/config/user.rb +10 -0
- data/default/.gitignore +6 -0
- data/default/Gemfile +11 -0
- data/default/README.md +24 -0
- data/default/Rakefile +8 -0
- data/default/app/README +3 -0
- data/default/app/css/.gitignore +0 -0
- data/default/app/helpers/helpers.rb.example +9 -0
- data/default/app/js/.gitignore +0 -0
- data/default/app/migrations/model.rb.example +20 -0
- data/default/app/models/model.rb.example +11 -0
- data/default/app/models/page-ext.rb.example +17 -0
- data/default/app/routes/site.rb.example +5 -0
- data/default/app/views/hello.haml.example +1 -0
- data/default/config.ru +3 -0
- data/default/config/.gitignore +0 -0
- data/default/config/database.rb.example +30 -0
- data/default/config/extensions.rb +5 -0
- data/default/config/user.rb.example +10 -0
- data/default/db/.gitignore +0 -0
- data/default/init.rb +15 -0
- data/default/public/.gitignore +0 -0
- data/extensions/contact_form/migrations/contact_form.rb +13 -0
- data/extensions/contact_form/models/contact_form.rb +13 -0
- data/extensions/contact_form/routes/contact_form.rb +11 -0
- data/extensions/contact_form/views/contact_form/edit.haml +8 -0
- data/extensions/contact_form/views/contact_form/form.haml +3 -0
- data/extensions/contact_form/views/contact_form/nav.haml +42 -0
- data/extensions/contact_form/views/contact_form/responses.haml +20 -0
- data/extensions/contact_form/views/contact_form/tabs.haml +8 -0
- data/extensions/default_theme/css/theme/_settings.scss +3 -0
- data/extensions/default_theme/css/theme/chrome.scss +66 -0
- data/extensions/default_theme/css/theme/reset.scss +34 -0
- data/extensions/default_theme/css/theme/style.scss +3 -0
- data/extensions/default_theme/info.yml +2 -0
- data/extensions/default_theme/public/browse.png +0 -0
- data/extensions/default_theme/views/base/id_portfolio.haml +32 -0
- data/extensions/default_theme/views/base/show.haml +31 -0
- data/extensions/default_theme/views/errors/error.haml +9 -0
- data/extensions/default_theme/views/errors/not_found.haml +11 -0
- data/extensions/default_theme/views/layout.haml +33 -0
- data/lib/aura.rb +315 -0
- data/lib/aura/admin.rb +41 -0
- data/lib/aura/app.rb +4 -0
- data/lib/aura/cli.rb +19 -0
- data/lib/aura/cli/base.rb +89 -0
- data/lib/aura/cli/helpers.rb +32 -0
- data/lib/aura/editor.rb +30 -0
- data/lib/aura/extension.rb +189 -0
- data/lib/aura/files.rb +38 -0
- data/lib/aura/menu.rb +142 -0
- data/lib/aura/models.rb +80 -0
- data/lib/aura/public.rb +68 -0
- data/lib/aura/rendering.rb +134 -0
- data/lib/aura/seeder.rb +38 -0
- data/lib/aura/slugs.rb +87 -0
- data/lib/aura/subtype.rb +48 -0
- data/lib/aura/tasks.rb +24 -0
- data/lib/aura/tasks/common.rb +17 -0
- data/lib/aura/tasks/db.rake +54 -0
- data/lib/aura/utils.rb +81 -0
- data/lib/aura/version.rb +25 -0
- data/lib/core/hasharray.rb +65 -0
- data/lib/core/object_ext.rb +9 -0
- data/lib/sequel/plugins/aura_custom.rb +16 -0
- data/lib/sequel/plugins/aura_editable.rb +39 -0
- data/lib/sequel/plugins/aura_hierarchy.rb +82 -0
- data/lib/sequel/plugins/aura_model.rb +271 -0
- data/lib/sequel/plugins/aura_renderable.rb +42 -0
- data/lib/sequel/plugins/aura_sluggable.rb +103 -0
- data/lib/sequel/plugins/aura_subtyped.rb +83 -0
- data/lib/terra.rb +185 -0
- data/lib/terra/ext.rb +16 -0
- data/lib/terra/field.rb +98 -0
- data/lib/terra/fields.rb +122 -0
- data/lib/terra/fieldset.rb +93 -0
- data/lib/terra/form.rb +111 -0
- data/manual/configuration.md +42 -0
- data/manual/extensions.md +45 -0
- data/manual/files.md +70 -0
- data/manual/helpers.md +39 -0
- data/manual/index.md +65 -0
- data/manual/models.md +58 -0
- data/manual/recipes.md +38 -0
- data/manual/recipes/bundling_sample_data.md +30 -0
- data/manual/recipes/creating_themes.md +10 -0
- data/manual/recipes/using_markdown_or_textile.md +24 -0
- data/manual/routes.md +39 -0
- data/manual/theming.md +55 -0
- data/manual/views.md +128 -0
- data/public/hi.html +0 -0
- data/public/images/admin/back.png +0 -0
- data/public/images/admin/browse.png +0 -0
- data/public/images/admin/mock-bg.png +0 -0
- data/public/images/admin/top-loader.gif +0 -0
- data/public/images/admin/uiscreen-loader.gif +0 -0
- data/public/images/admin_icons/add.png +0 -0
- data/public/images/admin_icons/contact.png +0 -0
- data/public/images/admin_icons/dashboard.png +0 -0
- data/public/images/admin_icons/generic.png +0 -0
- data/public/images/admin_icons/home-12.png +0 -0
- data/public/images/admin_icons/page.png +0 -0
- data/public/images/admin_icons/settings.png +0 -0
- data/public/images/jquery.wysiwyg.gif +0 -0
- data/public/js/admin.form_builder.js +15 -0
- data/public/js/admin.js +62 -0
- data/public/js/admin.layout.js +53 -0
- data/public/js/admin.nav.js +241 -0
- data/public/js/admin.slug.js +46 -0
- data/public/js/admin.subpage.js +15 -0
- data/public/js/jquery.hashlisten.js +85 -0
- data/public/js/jquery.js +166 -0
- data/public/js/jquery.livenavigate.js +58 -0
- data/public/js/jquery.livequery.js +226 -0
- data/public/js/jquery.quickvalidate.js +164 -0
- data/public/js/jquery.tmpl.js +486 -0
- data/public/js/jquery.uiscreen.js +150 -0
- data/public/js/jquery.wysiwyg.js +2339 -0
- data/public/js/jqueryui.js +766 -0
- data/public/js/lib.dirty.js +11 -0
- data/public/js/lib.loading.js +23 -0
- data/public/js/lib.wysiwyg.js +155 -0
- data/public/js/underscore-1.1.7.js +27 -0
- data/test/app/app/css/test_raw.css +1 -0
- data/test/app/app/css/test_sass.sass +3 -0
- data/test/app/app/damogram.txt +1 -0
- data/test/app/app/js/test_coffee.coffee +4 -0
- data/test/app/app/js/test_javascript.js +4 -0
- data/test/app/init.rb +5 -0
- data/test/stories/admin_css_story.rb +18 -0
- data/test/stories/css_js_story.rb +29 -0
- data/test/stories/first_login_story.rb +29 -0
- data/test/stories/visit_story.rb +39 -0
- data/test/stories_helper.rb +58 -0
- data/test/test_cli_helper.rb +31 -0
- data/test/test_helper.rb +111 -0
- data/test/test_temp_helper.rb +9 -0
- data/test/unit/cli_test.rb +38 -0
- data/test/unit/dump_test.rb +14 -0
- data/test/unit/extensions_test.rb +18 -0
- data/test/unit/files_test.rb +14 -0
- data/test/unit/flash_helper_test.rb +36 -0
- data/test/unit/html_helper_test.rb +29 -0
- data/test/unit/jquery_helper_test.rb +18 -0
- data/test/unit/model_test.rb +34 -0
- data/test/unit/page_helpers_test.rb +36 -0
- data/test/unit/seeder_test.rb +15 -0
- data/test/unit/settings_test.rb +29 -0
- data/test/unit/slug_test.rb +39 -0
- data/test/unit/ss_migration_test.rb +14 -0
- data/test/unit/terra_test.rb +125 -0
- data/test/unit/utils_test.rb +11 -0
- data/vendor/sinatra-sequel/.gitignore +3 -0
- data/vendor/sinatra-sequel/COPYING +18 -0
- data/vendor/sinatra-sequel/README.md +84 -0
- data/vendor/sinatra-sequel/Rakefile +67 -0
- data/vendor/sinatra-sequel/lib/sinatra/sequel.rb +73 -0
- data/vendor/sinatra-sequel/sinatra-sequel.gemspec +39 -0
- data/vendor/sinatra-sequel/spec/spec_sinatra_sequel.rb +70 -0
- metadata +536 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
- action ||= ''
|
2
|
+
- options = { :item => item, :action => action }
|
3
|
+
|
4
|
+
!= extends :'admin/settings'
|
5
|
+
|
6
|
+
- content_for! :title do
|
7
|
+
%h1 Create a new user
|
8
|
+
|
9
|
+
- content_for! :toolbar do
|
10
|
+
!= yield_content_of :'base/new', :toolbar, options
|
11
|
+
|
12
|
+
- content_for! :body do
|
13
|
+
!= partial item, :errors, :errors => item.errors
|
14
|
+
|
15
|
+
.slim.fixed
|
16
|
+
|
17
|
+
%form.ext{:action => action, :method => 'post' }
|
18
|
+
!= partial item, :form, options
|
19
|
+
|
20
|
+
%input{:type => 'hidden', :name => 'next', :value => R(:admin)}
|
21
|
+
|
22
|
+
%p.align-center
|
23
|
+
%br
|
24
|
+
%button.black{:type => 'submit'}
|
25
|
+
%span Save
|
@@ -0,0 +1,29 @@
|
|
1
|
+
- action ||= ''
|
2
|
+
- first ||= false # True if this is the user's first time.
|
3
|
+
- options = { :item => item, :action => action, :first => first }
|
4
|
+
|
5
|
+
- area_class 'no-sidebar'
|
6
|
+
|
7
|
+
- content_for :title do
|
8
|
+
%h1= "Welcome!"
|
9
|
+
|
10
|
+
- content_for :body do
|
11
|
+
.slim.fixed
|
12
|
+
%form.ext{:action => action, :method => 'post' }
|
13
|
+
!= partial item, :form, options
|
14
|
+
|
15
|
+
%input{:type => 'hidden', :name => 'next', :value => R(:admin)}
|
16
|
+
|
17
|
+
- unless first
|
18
|
+
%p.align-center
|
19
|
+
You may also
|
20
|
+
%a{:href => item.path(:delete)} delete your account
|
21
|
+
if you need to.
|
22
|
+
|
23
|
+
%p.align-center
|
24
|
+
%br
|
25
|
+
%button.black{:type => 'submit'}
|
26
|
+
- if first
|
27
|
+
%span Continue
|
28
|
+
- else
|
29
|
+
%span Save
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%link(rel='stylesheet' media='screen' type='text/css' href='/css/admin_watermark.css')
|
2
|
+
#admin_watermark
|
3
|
+
%ul
|
4
|
+
%li
|
5
|
+
%span
|
6
|
+
Hi there,
|
7
|
+
%strong>= current_user.email
|
8
|
+
!
|
9
|
+
|
10
|
+
%li
|
11
|
+
%a{:href => R(:admin), :target => '_top'} Admin
|
12
|
+
|
13
|
+
- unless @item.nil?
|
14
|
+
- if @item.try(:editable?)
|
15
|
+
%li
|
16
|
+
%a{:href => @item.path('edit'), :target => '_top'} Edit this page
|
data/aura.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require './lib/aura/version'
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.name = "aura"
|
4
|
+
s.version = Aura.version
|
5
|
+
s.summary = "Aura CMS."
|
6
|
+
s.description = "Aura is a CMS."
|
7
|
+
s.authors = ["Rico Sta. Cruz"]
|
8
|
+
s.email = ["rico@sinefunc.com"]
|
9
|
+
s.homepage = "http://buildwithaura.github.com/"
|
10
|
+
s.files = `git ls-files`.strip.split("\n")
|
11
|
+
s.executables = Dir["bin/*"].map { |f| File.basename(f) }
|
12
|
+
|
13
|
+
s.add_dependency "ffaker", "~> 0.4.0"
|
14
|
+
s.add_dependency "haml", "~> 3.1.1"
|
15
|
+
s.add_dependency "jsmin", "~> 1.0.1"
|
16
|
+
s.add_dependency "rack", "~> 1.3.0"
|
17
|
+
s.add_dependency "rtopia" # Helpers
|
18
|
+
s.add_dependency "sequel", "~> 3.16.0" # ORM
|
19
|
+
s.add_dependency "shield", "~> 0.0.3" # User authentication
|
20
|
+
s.add_dependency "compass", "~> 0.11.5"
|
21
|
+
s.add_dependency "sinatra", "~> 1.2.6"
|
22
|
+
s.add_dependency "sinatra-content-for", "~> 0.2"
|
23
|
+
s.add_dependency "sinatra-support", "~> 1.2.0"
|
24
|
+
s.add_dependency "nokogiri", "~> 1.5.0" # HTML parser
|
25
|
+
s.add_dependency "pistol", "~> 0.0.2" # Rack reloader
|
26
|
+
s.add_dependency "shake", "~> 0.1.2" # CLI helpers
|
27
|
+
s.add_dependency "rdiscount", "~> 1.6.8" # Markdown support
|
28
|
+
s.add_dependency "RedCloth", "~> 4.2.7" # Textile support
|
29
|
+
|
30
|
+
s.add_development_dependency "capybara", "~> 0.4.1.2"
|
31
|
+
s.add_development_dependency "rack-test", "~> 0.6.0"
|
32
|
+
s.add_development_dependency "sqlite3-ruby", "~> 1.3.3"
|
33
|
+
s.add_development_dependency "launchy", "~> 0.3.7"
|
34
|
+
s.add_development_dependency "coffee-script", "~> 2.1.1"
|
35
|
+
s.add_development_dependency "contest", "~> 0.1.3"
|
36
|
+
end
|
data/bin/aura
ADDED
data/config/database.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Main.configure do |m|
|
2
|
+
m.set :database_url, "sqlite://db/development.db"
|
3
|
+
end
|
4
|
+
|
5
|
+
Main.configure(:test) do |m|
|
6
|
+
path = "#{Dir.tmpdir}/test-#{rand}.db"
|
7
|
+
|
8
|
+
m.set :migrations_log, lambda { StringIO.new }
|
9
|
+
m.set :database_url, "sqlite://#{path}"
|
10
|
+
|
11
|
+
at_exit { FileUtils.rm_rf path }
|
12
|
+
end
|
data/config/scss.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
class Main
|
2
|
+
set :scss, {
|
3
|
+
:load_paths => [
|
4
|
+
Aura.gem_root('app/css'),
|
5
|
+
Dir[Aura.gem_root('extensions/*/css')],
|
6
|
+
Dir[Aura.root('extensions/*/css')],
|
7
|
+
Aura.root('app/css')
|
8
|
+
].flatten
|
9
|
+
}
|
10
|
+
set :scss, self.scss.merge(:line_numbers => true, :always_check => true) if self.development?
|
11
|
+
set :scss, self.scss.merge(:style => :compressed) if self.production?
|
12
|
+
|
13
|
+
set :sass, scss
|
14
|
+
end
|
data/config/user.rb
ADDED
data/default/.gitignore
ADDED
data/default/Gemfile
ADDED
data/default/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# My Application
|
2
|
+
|
3
|
+
Config (optional)
|
4
|
+
-----------------
|
5
|
+
|
6
|
+
See `config/database.rb.example`.
|
7
|
+
|
8
|
+
Development setup
|
9
|
+
-----------------
|
10
|
+
|
11
|
+
$ bundle install
|
12
|
+
$ rackup
|
13
|
+
|
14
|
+
Deploying to Heroku
|
15
|
+
-------------------
|
16
|
+
|
17
|
+
heroku create NAME --stack bamboo-mri-1.9.2
|
18
|
+
git push heroku master
|
19
|
+
|
20
|
+
Default user names
|
21
|
+
------------------
|
22
|
+
|
23
|
+
After the first installation, log in with `test@sinefunc.com` / `password`.
|
24
|
+
|
data/default/Rakefile
ADDED
data/default/app/README
ADDED
File without changes
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class Main
|
2
|
+
migration "Aura v0.0.1 - page" do
|
3
|
+
database.create_table :pages do
|
4
|
+
# aura_hierarchy
|
5
|
+
primary_key :id
|
6
|
+
foreign_key :parent_id, :pages
|
7
|
+
|
8
|
+
String :title
|
9
|
+
String :body, :text => true
|
10
|
+
String :custom, :text => true
|
11
|
+
|
12
|
+
# aura_sluggable
|
13
|
+
String :slug
|
14
|
+
|
15
|
+
|
16
|
+
Time :created_at
|
17
|
+
Time :modified_at
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Something < Sequel::Model
|
2
|
+
plugin :aura_sluggable # Accessible via slug: /about-us/services
|
3
|
+
plugin :aura_renderable # Can show a page when accessed by that URL
|
4
|
+
plugin :aura_editable # Shows up in editor
|
5
|
+
|
6
|
+
form do
|
7
|
+
text :title, "Title", :class => 'title main-title'
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.show_on_sidebar?; true; end
|
11
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This is an example for extending the page class.
|
2
|
+
|
3
|
+
class Page
|
4
|
+
subtype :portfolio,
|
5
|
+
:name => "Portfolio page",
|
6
|
+
:template => "id_portfolio"
|
7
|
+
|
8
|
+
custom_field :excerpt
|
9
|
+
|
10
|
+
form :portfolio do
|
11
|
+
text :excerpt, "Portfolio excerpt"
|
12
|
+
|
13
|
+
#fieldset :extra do
|
14
|
+
# text :'custom.excerpt', "Excerpt"
|
15
|
+
#end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 Hello there!
|
data/default/config.ru
ADDED
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# This tells Aura which database to connect.
|
2
|
+
# The default below creates a SQLite database file: no setup required.
|
3
|
+
#
|
4
|
+
# Rename this file to `database.rb` to define your own.
|
5
|
+
|
6
|
+
Main.configure do |m|
|
7
|
+
m.set :database_url, "sqlite://db/development.db"
|
8
|
+
end
|
9
|
+
|
10
|
+
Main.configure(:test) do |m|
|
11
|
+
m.set :database_url, "sqlite://tmp/test.db"
|
12
|
+
end
|
13
|
+
|
14
|
+
# More examples:
|
15
|
+
#
|
16
|
+
# m.set :database_url, "mysql://root:password@localhost/db_name"
|
17
|
+
# m.set :database_url, "postgres://user:password@localhost/db_name"
|
18
|
+
#
|
19
|
+
# Advanced example:
|
20
|
+
# To have a different config per environment, do it this way.
|
21
|
+
#
|
22
|
+
# # Default
|
23
|
+
# Main.configure do |m|
|
24
|
+
# m.set :database_url, "sqlite://db/development.db"
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# # Production
|
28
|
+
# Main.configure(:production) do |m|
|
29
|
+
# m.set :database_url, "mysql://root@localhost/db"
|
30
|
+
# end
|
File without changes
|
data/default/init.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
ENV['APP_FILE'] = __FILE__
|
2
|
+
|
3
|
+
# Gems
|
4
|
+
require "rubygems" unless defined?(::Gem)
|
5
|
+
|
6
|
+
begin
|
7
|
+
require "bundler"
|
8
|
+
Bundler.setup
|
9
|
+
rescue LoadError => e
|
10
|
+
$stderr << "\nYou will need Bundler to run this application. Try:\n"
|
11
|
+
$stderr << "$ gem install bundler\n\n"
|
12
|
+
exit
|
13
|
+
end
|
14
|
+
|
15
|
+
require "aura/app"
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class ContactForm < Sequel::Model
|
2
|
+
plugin :aura_sluggable # Accessible via slug: /about-us/services
|
3
|
+
plugin :aura_renderable # Can show a page when accessed by that URL
|
4
|
+
plugin :aura_editable
|
5
|
+
#plugin :aura_hierarchy
|
6
|
+
|
7
|
+
def self.show_on_sidebar?; true; end
|
8
|
+
|
9
|
+
form do
|
10
|
+
text :title, "Title", :class => 'title main-title'
|
11
|
+
text :slug, "Slug", :class => 'compact hide'
|
12
|
+
end
|
13
|
+
end
|