kuztuscms 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/.rvmrc +55 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +156 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +12 -0
- data/Rakefile +29 -0
- data/app/assets/images/kuztuscms/.gitkeep +0 -0
- data/app/assets/images/kuztuscms/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/kuztuscms/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/kuztuscms/.DS_Store +0 -0
- data/app/assets/javascripts/kuztuscms/application.js +15 -0
- data/app/assets/javascripts/kuztuscms/bootstrap.js +1720 -0
- data/app/assets/javascripts/kuztuscms/codemirror-compressed.js +1 -0
- data/app/assets/stylesheets/kuztuscms/.DS_Store +0 -0
- data/app/assets/stylesheets/kuztuscms/application.css.scss +16 -0
- data/app/assets/stylesheets/kuztuscms/bootstrap-responsive.css +581 -0
- data/app/assets/stylesheets/kuztuscms/bootstrap.css +3496 -0
- data/app/assets/stylesheets/kuztuscms/codemirror.css +115 -0
- data/app/controllers/kuztuscms/articles_controller.rb +53 -0
- data/app/controllers/kuztuscms/home_controller.rb +6 -0
- data/app/controllers/kuztuscms/layouts_controller.rb +75 -0
- data/app/controllers/kuztuscms/pages_controller.rb +73 -0
- data/app/controllers/kuztuscms/settings_controller.rb +48 -0
- data/app/controllers/kuztuscms/templates_controller.rb +72 -0
- data/app/controllers/kuztuscms/users_controller.rb +74 -0
- data/app/controllers/kuztuscms_controller.rb +23 -0
- data/app/helpers/kuztuscms/application_helper.rb +4 -0
- data/app/models/kuztuscms/article.rb +4 -0
- data/app/models/kuztuscms/layout.rb +14 -0
- data/app/models/kuztuscms/page.rb +8 -0
- data/app/models/kuztuscms/setting.rb +11 -0
- data/app/models/kuztuscms/template.rb +14 -0
- data/app/models/kuztuscms/user.rb +20 -0
- data/app/views/devise/_links.erb +27 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +18 -0
- data/app/views/devise/registrations/edit.html.erb +25 -0
- data/app/views/devise/registrations/new.html.erb +21 -0
- data/app/views/devise/sessions/new.html.erb +31 -0
- data/app/views/devise/unlocks/new.html.erb +19 -0
- data/app/views/kuztuscms/articles/_form.html.erb +35 -0
- data/app/views/kuztuscms/articles/edit.html.erb +1 -0
- data/app/views/kuztuscms/articles/index.html.erb +22 -0
- data/app/views/kuztuscms/articles/new.html.erb +1 -0
- data/app/views/kuztuscms/articles/show.html.erb +4 -0
- data/app/views/kuztuscms/home/index.html.erb +1 -0
- data/app/views/kuztuscms/layouts/_form.html.erb +58 -0
- data/app/views/kuztuscms/layouts/edit.html.erb +2 -0
- data/app/views/kuztuscms/layouts/index.html.erb +32 -0
- data/app/views/kuztuscms/layouts/new.html.erb +2 -0
- data/app/views/kuztuscms/pages/_form.html.erb +72 -0
- data/app/views/kuztuscms/pages/edit.html.erb +1 -0
- data/app/views/kuztuscms/pages/index.html.erb +28 -0
- data/app/views/kuztuscms/pages/new.html.erb +1 -0
- data/app/views/kuztuscms/pages/show.html.erb +1 -0
- data/app/views/kuztuscms/settings/_form.html.erb +35 -0
- data/app/views/kuztuscms/settings/edit.html.erb +1 -0
- data/app/views/kuztuscms/settings/index.html.erb +24 -0
- data/app/views/kuztuscms/settings/new.html.erb +1 -0
- data/app/views/kuztuscms/shared/_codemirror.html.erb +20 -0
- data/app/views/kuztuscms/templates/_form.html.erb +58 -0
- data/app/views/kuztuscms/templates/edit.html.erb +3 -0
- data/app/views/kuztuscms/templates/index.html.erb +28 -0
- data/app/views/kuztuscms/templates/new.html.erb +2 -0
- data/app/views/kuztuscms/users/_form.html.erb +56 -0
- data/app/views/kuztuscms/users/edit.html.erb +1 -0
- data/app/views/kuztuscms/users/index.html.erb +28 -0
- data/app/views/kuztuscms/users/new.html.erb +1 -0
- data/app/views/kuztuscms/users/show.html.erb +15 -0
- data/app/views/layouts/kuztuscms/application.html.erb +57 -0
- data/config/initializers/devise.rb +225 -0
- data/config/initializers/resolver.rb +65 -0
- data/config/locales/devise.en.yml +57 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +18 -0
- data/db/migrate/20120218074040_devise_create_kuztuscms_users.rb +52 -0
- data/db/migrate/20120218075211_create_kuztuscms_pages.rb +15 -0
- data/db/migrate/20120311080242_create_kuztuscms_templates.rb +38 -0
- data/db/migrate/20120311141419_create_kuztuscms_articles.rb +10 -0
- data/db/migrate/20120311173954_create_kuztuscms_layouts.rb +43 -0
- data/db/migrate/20120316081613_create_kuztuscms_settings.rb +10 -0
- data/kuztuscms.gemspec +33 -0
- data/lib/kuztuscms/engine.rb +13 -0
- data/lib/kuztuscms/settings.rb +26 -0
- data/lib/kuztuscms/version.rb +3 -0
- data/lib/kuztuscms.rb +7 -0
- data/lib/tasks/kuztuscms_tasks.rake +4 -0
- data/script/rails +8 -0
- data/spec/controllers/kuztuscms/articles_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/languages_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/layouts_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/pages_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/settings_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/templates_controller_spec.rb +164 -0
- data/spec/controllers/kuztuscms/translations_controller_spec.rb +164 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/javascripts/home.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/assets/stylesheets/home.css +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/home_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +16 -0
- data/spec/dummy/config/application.rb +62 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +38 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +9 -0
- data/spec/dummy/config/locales/ru.yml +5 -0
- data/spec/dummy/config/routes.rb +8 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20120313083011_devise_create_kuztuscms_users.kuztuscms.rb +59 -0
- data/spec/dummy/db/migrate/20120313083012_create_kuztuscms_pages.kuztuscms.rb +16 -0
- data/spec/dummy/db/migrate/20120313083013_create_kuztuscms_templates.kuztuscms.rb +15 -0
- data/spec/dummy/db/migrate/20120313083014_create_kuztuscms_articles.kuztuscms.rb +11 -0
- data/spec/dummy/db/migrate/20120313083015_create_kuztuscms_layouts.kuztuscms.rb +41 -0
- data/spec/dummy/db/migrate/20120316084434_create_kuztuscms_settings.kuztuscms.rb +11 -0
- data/spec/dummy/db/schema.rb +90 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/helpers/kuztuscms/articles_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/languages_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/layouts_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/pages_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/settings_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/templates_helper_spec.rb +15 -0
- data/spec/helpers/kuztuscms/translations_helper_spec.rb +15 -0
- data/spec/models/kuztuscms/article_spec.rb +5 -0
- data/spec/models/kuztuscms/language_spec.rb +5 -0
- data/spec/models/kuztuscms/layout_spec.rb +5 -0
- data/spec/models/kuztuscms/page_spec.rb +5 -0
- data/spec/models/kuztuscms/setting_spec.rb +5 -0
- data/spec/models/kuztuscms/template_spec.rb +5 -0
- data/spec/models/kuztuscms/translation_spec.rb +5 -0
- data/spec/models/kuztuscms/user_spec.rb +5 -0
- data/spec/routing/kuztuscms/articles_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/languages_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/layouts_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/pages_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/settings_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/templates_routing_spec.rb +35 -0
- data/spec/routing/kuztuscms/translations_routing_spec.rb +35 -0
- data/spec/views/kuztuscms/articles/edit.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/articles/index.html.erb_spec.rb +24 -0
- data/spec/views/kuztuscms/articles/new.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/articles/show.html.erb_spec.rb +18 -0
- data/spec/views/kuztuscms/languages/edit.html.erb_spec.rb +22 -0
- data/spec/views/kuztuscms/languages/index.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/languages/new.html.erb_spec.rb +22 -0
- data/spec/views/kuztuscms/languages/show.html.erb_spec.rb +21 -0
- data/spec/views/kuztuscms/layouts/edit.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/layouts/index.html.erb_spec.rb +24 -0
- data/spec/views/kuztuscms/layouts/new.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/layouts/show.html.erb_spec.rb +18 -0
- data/spec/views/kuztuscms/pages/edit.html.erb_spec.rb +15 -0
- data/spec/views/kuztuscms/pages/index.html.erb_spec.rb +14 -0
- data/spec/views/kuztuscms/pages/new.html.erb_spec.rb +15 -0
- data/spec/views/kuztuscms/pages/show.html.erb_spec.rb +11 -0
- data/spec/views/kuztuscms/settings/edit.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/settings/index.html.erb_spec.rb +24 -0
- data/spec/views/kuztuscms/settings/new.html.erb_spec.rb +20 -0
- data/spec/views/kuztuscms/settings/show.html.erb_spec.rb +18 -0
- data/spec/views/kuztuscms/templates/edit.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/templates/index.html.erb_spec.rb +40 -0
- data/spec/views/kuztuscms/templates/new.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/templates/show.html.erb_spec.rb +30 -0
- data/spec/views/kuztuscms/translations/edit.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/translations/index.html.erb_spec.rb +40 -0
- data/spec/views/kuztuscms/translations/new.html.erb_spec.rb +28 -0
- data/spec/views/kuztuscms/translations/show.html.erb_spec.rb +30 -0
- data/test/integration/kuztuscms/setting_test.rb +7 -0
- metadata +351 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
|
4
|
+
|
5
|
+
<p>Click the link below to unlock your account:</p>
|
6
|
+
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2>Change your password</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
<%= f.hidden_field :reset_password_token %>
|
6
|
+
|
7
|
+
<div><%= f.label :password, "New password" %><br />
|
8
|
+
<%= f.password_field :password %></div>
|
9
|
+
|
10
|
+
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
11
|
+
<%= f.password_field :password_confirmation %></div>
|
12
|
+
|
13
|
+
<div><%= f.submit "Change my password" %></div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render "links" %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
2
|
+
<fieldset>
|
3
|
+
<legend>Forgot your password?</legend>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div class="control-group">
|
7
|
+
<%= f.label :email, :class => 'control-label' %>
|
8
|
+
<div class="controls">
|
9
|
+
<%= f.email_field :email, :class => 'email_field' %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="form-actions">
|
14
|
+
<%= f.submit 'Send me reset password instructions', :class => 'btn btn-primary' %>
|
15
|
+
<%= render "links" %>
|
16
|
+
</div>
|
17
|
+
</fieldset>
|
18
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :username %><br />
|
7
|
+
<%= f.text_field :username %></div>
|
8
|
+
|
9
|
+
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
10
|
+
<%= f.password_field :password, :autocomplete => "off" %></div>
|
11
|
+
|
12
|
+
<div><%= f.label :password_confirmation %><br />
|
13
|
+
<%= f.password_field :password_confirmation %></div>
|
14
|
+
|
15
|
+
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
16
|
+
<%= f.password_field :current_password %></div>
|
17
|
+
|
18
|
+
<div><%= f.submit "Update" %></div>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<h3>Cancel my account</h3>
|
22
|
+
|
23
|
+
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
|
24
|
+
|
25
|
+
<%= link_to "Back", :back %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<h2>Sign up</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email %></div>
|
8
|
+
|
9
|
+
<div><%= f.label :username %><br />
|
10
|
+
<%= f.text_field :username %></div>
|
11
|
+
|
12
|
+
<div><%= f.label :password %><br />
|
13
|
+
<%= f.password_field :password %></div>
|
14
|
+
|
15
|
+
<div><%= f.label :password_confirmation %><br />
|
16
|
+
<%= f.password_field :password_confirmation %></div>
|
17
|
+
|
18
|
+
<div><%= f.submit "Sign up" %></div>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= render "links" %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
2
|
+
<fieldset>
|
3
|
+
<legend>Sign in</legend>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div class="control-group">
|
7
|
+
<%= f.label :username, :class => 'control-label' %>
|
8
|
+
<div class="controls">
|
9
|
+
<%= f.text_field :username, :class => 'text_field' %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="control-group">
|
14
|
+
<%= f.label :password, :class => 'control-label' %>
|
15
|
+
<div class="controls">
|
16
|
+
<%= f.password_field :password, :class => 'password_field' %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<% if devise_mapping.rememberable? -%>
|
21
|
+
<label class="checkbox">
|
22
|
+
<%= f.check_box :remember_me %> <%= f.label :remember_me %>
|
23
|
+
</label>
|
24
|
+
<% end -%>
|
25
|
+
|
26
|
+
<div class="form-actions">
|
27
|
+
<%= f.submit 'Sign in', :class => 'btn btn-primary' %>
|
28
|
+
<%= render "links" %>
|
29
|
+
</div>
|
30
|
+
</fieldset>
|
31
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
2
|
+
<fieldset>
|
3
|
+
<legend>Resend unlock instructions</legend>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div class="control-group">
|
7
|
+
<%= f.label :email, :class => 'control-label' %>
|
8
|
+
<div class="controls">
|
9
|
+
<%= f.email_field :email, :class => 'email_field' %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="form-actions">
|
14
|
+
<%= f.submit 'Resend unlock instructions', :class => 'btn btn-primary' %>
|
15
|
+
<%= render "links" %>
|
16
|
+
</div>
|
17
|
+
</fieldset>
|
18
|
+
<% end %>
|
19
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<%= form_for([kuztuscms, @article]) do |f| %>
|
2
|
+
<% if @article.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@article.errors.count, "error") %> prohibited this article from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @article.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<fieldset>
|
14
|
+
<legend><%= controller.action_name.capitalize %> Article</legend>
|
15
|
+
|
16
|
+
<div class="control-group">
|
17
|
+
<%= f.label :name, :class => 'control-label' %>
|
18
|
+
<div class="controls">
|
19
|
+
<%= f.text_field :name, :class => 'text_field' %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="control-group">
|
24
|
+
<%= f.label :body, :class => 'control-label' %>
|
25
|
+
<div class="controls">
|
26
|
+
<%= f.text_area :body, :class => 'span8 text_area' %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="form-actions">
|
31
|
+
<%= f.submit nil, :class => 'btn btn-primary' %>
|
32
|
+
<%= link_to 'Cancel', kuztuscms.articles_path, :class => 'btn' %>
|
33
|
+
</div>
|
34
|
+
</fieldset>
|
35
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<h1>Articles</h1>
|
2
|
+
<table class="table table-striped">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th>Name</th>
|
6
|
+
<th>Actions</th>
|
7
|
+
</tr>
|
8
|
+
</thead>
|
9
|
+
<tbody>
|
10
|
+
<% @articles.each do |article| %>
|
11
|
+
<tr>
|
12
|
+
<td><%= article.name %></td>
|
13
|
+
<td>
|
14
|
+
<%= link_to 'Edit', kuztuscms.edit_article_path(article), :class => 'btn btn-mini' %>
|
15
|
+
<%= link_to 'Destroy', kuztuscms.article_path(article), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
|
16
|
+
</td>
|
17
|
+
</tr>
|
18
|
+
<% end %>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<%= link_to 'New', kuztuscms.new_article_path, :class => 'btn btn-primary' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Hi this is a home page for kuztus cms!
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<%= form_for [kuztuscms, @layout], :html => { :class => 'form-horizontal' } do |f| %>
|
2
|
+
<% if @layout.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@layout.errors.count, "error") %> prohibited this layout from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @layout.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<fieldset>
|
14
|
+
<legend><%= controller.action_name.capitalize %> layout</legend>
|
15
|
+
|
16
|
+
<div class="control-group">
|
17
|
+
<%= f.label :path, :class => 'control-label' %>
|
18
|
+
<div class="controls">
|
19
|
+
<%= f.text_field :path, :class => 'text_field' %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="control-group">
|
24
|
+
<%= f.label :format, :class => 'control-label' %>
|
25
|
+
<div class="controls">
|
26
|
+
<%= f.text_field :format, :class => 'text_field' %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="control-group">
|
31
|
+
<%= f.label :locale, :class => 'control-label' %>
|
32
|
+
<div class="controls">
|
33
|
+
<%= f.select :locale,
|
34
|
+
options_for_select(@locales), :class => 'select' %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="control-group">
|
39
|
+
<%= f.label :handler, :class => 'control-label' %>
|
40
|
+
<div class="controls">
|
41
|
+
<%= f.select :handler,
|
42
|
+
options_for_select(@handlers), :class => 'select' %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="control-group">
|
47
|
+
<%= f.label :body, :class => 'control-label' %>
|
48
|
+
<div class="controls">
|
49
|
+
<%= f.text_area :body, :class => 'span8 text_area' %>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="form-actions">
|
54
|
+
<%= f.submit nil, :class => 'btn btn-primary' %>
|
55
|
+
<%= link_to 'Cancel', kuztuscms.layouts_path, :class => 'btn' %>
|
56
|
+
</div>
|
57
|
+
</fieldset>
|
58
|
+
<% end %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<h1>Layouts</h1>
|
2
|
+
<table class="table table-striped">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th>Path</th>
|
6
|
+
<th>Format</th>
|
7
|
+
<th>Locale</th>
|
8
|
+
<th>Handler</th>
|
9
|
+
<th>Actions</th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% @layouts.each do |layout| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= layout.path %></td>
|
16
|
+
<td><%= layout.format %></td>
|
17
|
+
<td><%= layout.locale %></td>
|
18
|
+
<td><%= layout.handler %></td>
|
19
|
+
<td>
|
20
|
+
<%= link_to 'Edit', kuztuscms.edit_layout_path(layout), :class => 'btn btn-mini' %>
|
21
|
+
<%= link_to 'Destroy',
|
22
|
+
kuztuscms.layout_path(layout),
|
23
|
+
:method => :delete,
|
24
|
+
:confirm => 'Are you sure?',
|
25
|
+
:class => 'btn btn-mini btn-danger' if layout.path != 'default' %>
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
|
32
|
+
<%= link_to 'New', kuztuscms.new_layout_path, :class => 'btn btn-primary' %>
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<%= form_for [kuztuscms, @page], :html => { :class => 'form-horizontal' } do |f| %>
|
2
|
+
<% if @page.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@page.errors.count, "error") %> prohibited this page from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @page.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<fieldset>
|
14
|
+
<legend><%= controller.action_name.capitalize %> Page</legend>
|
15
|
+
|
16
|
+
<div class="control-group">
|
17
|
+
<%= f.label :name, :class => 'control-label' %>
|
18
|
+
<div class="controls">
|
19
|
+
<%= f.text_field :name, :class => 'text_field' %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="control-group">
|
24
|
+
<%= f.label :article_id, :class => 'control-label' %>
|
25
|
+
<div class="controls">
|
26
|
+
<%= f.select :article_id,
|
27
|
+
options_from_collection_for_select(@articles, :id, :name), :class => 'select' %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="control-group">
|
32
|
+
<%= f.label :layout_id, :class => 'control-label' %>
|
33
|
+
<div class="controls">
|
34
|
+
<%= f.select :layout_id,
|
35
|
+
options_from_collection_for_select(@layouts, :id, :path), :class => 'select' %>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="control-group">
|
40
|
+
<%= f.label :title, :class => 'control-label' %>
|
41
|
+
<div class="controls">
|
42
|
+
<%= f.text_field :title, :class => 'text_field' %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="control-group">
|
47
|
+
<%= f.label :path, :class => 'control-label' %>
|
48
|
+
<div class="controls">
|
49
|
+
<%= f.text_field :path, :class => 'text_field' %>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="control-group">
|
54
|
+
<%= f.label :description, :class => 'control-label' %>
|
55
|
+
<div class="controls">
|
56
|
+
<%= f.text_area :description, :class => 'span8 text_area' %>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<div class="control-group">
|
61
|
+
<%= f.label :keywords, :class => 'control-label' %>
|
62
|
+
<div class="controls">
|
63
|
+
<%= f.text_area :keywords, :class => 'span8 text_area' %>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div class="form-actions">
|
68
|
+
<%= f.submit nil, :class => 'btn btn-primary' %>
|
69
|
+
<%= link_to 'Cancel', kuztuscms.pages_path, :class => 'btn' %>
|
70
|
+
</div>
|
71
|
+
</fieldset>
|
72
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<h1>Pages</h1>
|
2
|
+
<table class="table table-striped">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th>Name</th>
|
6
|
+
<th>Path</th>
|
7
|
+
<th>Article</th>
|
8
|
+
<th>Layout</th>
|
9
|
+
<th>Actions</th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% @pages.each do |page| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= page.name %></td>
|
16
|
+
<td><%= page.path %></td>
|
17
|
+
<td><%= page.article.name %></td>
|
18
|
+
<td><%= page.layout.path %></td>
|
19
|
+
<td>
|
20
|
+
<%= link_to 'Edit', kuztuscms.edit_page_path(page), :class => 'btn btn-mini' %>
|
21
|
+
<%= link_to 'Destroy', kuztuscms.page_path(page), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</tbody>
|
26
|
+
</table>
|
27
|
+
|
28
|
+
<%= link_to 'New', kuztuscms.new_page_path, :class => 'btn btn-primary' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%=raw @article.body %>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<%= form_for [kuztuscms, @setting], :html => { :class => 'form-horizontal' } do |f| %>
|
2
|
+
<% if @setting.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@setting.errors.count, "error") %> prohibited this setting from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @setting.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<fieldset>
|
14
|
+
<legend><%= controller.action_name.capitalize %> Setting</legend>
|
15
|
+
|
16
|
+
<div class="control-group">
|
17
|
+
<%= f.label :key, :class => 'control-label' %>
|
18
|
+
<div class="controls">
|
19
|
+
<%= f.text_field :key, :class => 'text_field' %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="control-group">
|
24
|
+
<%= f.label :value, :class => 'control-label' %>
|
25
|
+
<div class="controls">
|
26
|
+
<%= f.text_field :value, :class => 'text_field' %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="form-actions">
|
31
|
+
<%= f.submit nil, :class => 'btn btn-primary' %>
|
32
|
+
<%= link_to 'Cancel', kuztuscms.settings_path, :class => 'btn' %>
|
33
|
+
</div>
|
34
|
+
</fieldset>
|
35
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<h1>Settings</h1>
|
2
|
+
<table class="table table-striped">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th>Key</th>
|
6
|
+
<th>Value</th>
|
7
|
+
<th>Actions</th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<% @settings.each do |setting| %>
|
12
|
+
<tr>
|
13
|
+
<td><%= setting.key %></td>
|
14
|
+
<td><%= setting.value %></td>
|
15
|
+
<td>
|
16
|
+
<%= link_to 'Edit', kuztuscms.edit_setting_path(setting), :class => 'btn btn-mini' %>
|
17
|
+
<%= link_to 'Destroy', kuztuscms.setting_path(setting), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
|
18
|
+
</td>
|
19
|
+
</tr>
|
20
|
+
<% end %>
|
21
|
+
</tbody>
|
22
|
+
</table>
|
23
|
+
|
24
|
+
<%= link_to 'New', kuztuscms.new_setting_path, :class => 'btn btn-primary' %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<% content_for :javascripts, javascript_include_tag("kuztuscms/codemirror-compressed") %>
|
2
|
+
<% content_for :stylesheets, stylesheet_link_tag("kuztuscms/codemirror", :media => "all") %>
|
3
|
+
|
4
|
+
<script type="text/javascript">
|
5
|
+
$(document).ready(function(){
|
6
|
+
var myCodeMirror = CodeMirror.fromTextArea(
|
7
|
+
document.getElementById('<%= textarea_id %>'),
|
8
|
+
{
|
9
|
+
lineNumbers: true,
|
10
|
+
matchBrackets: true,
|
11
|
+
mode: "application/x-ejs",
|
12
|
+
indentUnit: 2,
|
13
|
+
indentWithTabs: false,
|
14
|
+
enterMode: "keep",
|
15
|
+
tabMode: "shift"
|
16
|
+
}
|
17
|
+
);
|
18
|
+
});
|
19
|
+
</script>
|
20
|
+
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<%= form_for [kuztuscms, @template], :html => { :class => 'form-horizontal' } do |f| %>
|
2
|
+
<% if @template.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@template.errors.count, "error") %> prohibited this template from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @template.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<fieldset>
|
14
|
+
<legend><%= controller.action_name.capitalize %> template</legend>
|
15
|
+
|
16
|
+
<div class="control-group">
|
17
|
+
<%= f.label :path, :class => 'control-label' %>
|
18
|
+
<div class="controls">
|
19
|
+
<%= f.text_field :path, :class => 'text_field' %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="control-group">
|
24
|
+
<%= f.label :format, :class => 'control-label' %>
|
25
|
+
<div class="controls">
|
26
|
+
<%= f.text_field :format, :class => 'text_field' %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div class="control-group">
|
31
|
+
<%= f.label :locale, :class => 'control-label' %>
|
32
|
+
<div class="controls">
|
33
|
+
<%= f.select :locale,
|
34
|
+
options_for_select(@locales), :class => 'select' %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="control-group">
|
39
|
+
<%= f.label :handler, :class => 'control-label' %>
|
40
|
+
<div class="controls">
|
41
|
+
<%= f.select :handler,
|
42
|
+
options_for_select(@handlers), :class => 'select' %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="control-group">
|
47
|
+
<%= f.label :body, :class => 'control-label' %>
|
48
|
+
<div class="controls">
|
49
|
+
<%= f.text_area :body, :class => 'text_area' %>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="form-actions">
|
54
|
+
<%= f.submit nil, :class => 'btn btn-primary' %>
|
55
|
+
<%= link_to 'Cancel', kuztuscms.templates_path, :class => 'btn' %>
|
56
|
+
</div>
|
57
|
+
</fieldset>
|
58
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<h1>Templates</h1>
|
2
|
+
<table class="table table-striped">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th>Path</th>
|
6
|
+
<th>Format</th>
|
7
|
+
<th>Locale</th>
|
8
|
+
<th>Handler</th>
|
9
|
+
<th>Actions</th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% @templates.each do |template| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= template.path %></td>
|
16
|
+
<td><%= template.format %></td>
|
17
|
+
<td><%= template.locale %></td>
|
18
|
+
<td><%= template.handler %></td>
|
19
|
+
<td>
|
20
|
+
<%= link_to 'Edit', kuztuscms.edit_template_path(template), :class => 'btn btn-mini' %>
|
21
|
+
<%= link_to 'Destroy', kuztuscms.template_path(template), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</tbody>
|
26
|
+
</table>
|
27
|
+
|
28
|
+
<%= link_to 'New', kuztuscms.new_template_path, :class => 'btn btn-primary' %>
|