grandstand 0.2.7 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -0
- data/README.md +72 -0
- data/app/controllers/galleries_controller.rb +4 -0
- data/app/controllers/grandstand/galleries_controller.rb +10 -1
- data/app/controllers/grandstand/images_controller.rb +9 -3
- data/app/controllers/grandstand/main_controller.rb +2 -4
- data/app/controllers/grandstand/pages_controller.rb +8 -1
- data/app/controllers/grandstand/sessions_controller.rb +1 -1
- data/app/helpers/grandstand/main_helper.rb +17 -0
- data/app/models/grandstand/gallery.rb +2 -1
- data/app/models/grandstand/image.rb +1 -0
- data/app/models/grandstand/page.rb +4 -0
- data/app/models/grandstand/page_section.rb +2 -0
- data/app/models/grandstand/post.rb +2 -0
- data/app/models/grandstand/user.rb +6 -4
- data/app/views/grandstand/galleries/delete.html.erb +2 -2
- data/app/views/grandstand/galleries/edit.html.erb +1 -1
- data/app/views/grandstand/galleries/editor.html.erb +3 -3
- data/app/views/grandstand/galleries/index.html.erb +5 -5
- data/app/views/grandstand/galleries/new.html.erb +1 -1
- data/app/views/grandstand/galleries/show.html.erb +11 -10
- data/app/views/grandstand/images/_form.html.erb +1 -1
- data/app/views/grandstand/images/delete.html.erb +2 -2
- data/app/views/grandstand/images/edit.html.erb +2 -2
- data/app/views/grandstand/images/new.html.erb +2 -2
- data/app/views/grandstand/images/show.html.erb +2 -2
- data/app/views/grandstand/main/index.html.erb +8 -10
- data/app/views/grandstand/pages/_form.html.erb +4 -5
- data/app/views/grandstand/pages/_row.html.erb +4 -3
- data/app/views/grandstand/pages/delete.html.erb +2 -2
- data/app/views/grandstand/pages/edit.html.erb +6 -3
- data/app/views/grandstand/pages/index.html.erb +10 -7
- data/app/views/grandstand/pages/new.html.erb +6 -3
- data/app/views/grandstand/pages/show.html.erb +25 -3
- data/app/views/grandstand/posts/_form.html.erb +1 -3
- data/app/views/grandstand/posts/_list.html.erb +1 -1
- data/app/views/grandstand/posts/delete.html.erb +1 -2
- data/app/views/grandstand/posts/edit.html.erb +5 -2
- data/app/views/grandstand/posts/index.html.erb +10 -5
- data/app/views/grandstand/posts/new.html.erb +5 -2
- data/app/views/grandstand/posts/show.html.erb +3 -5
- data/app/views/grandstand/sessions/forgot.html.erb +2 -2
- data/app/views/grandstand/sessions/show.html.erb +2 -2
- data/app/views/grandstand/shared/_footer.html.erb +1 -0
- data/app/views/grandstand/users/_form.html.erb +7 -3
- data/app/views/grandstand/users/delete.html.erb +1 -1
- data/app/views/grandstand/users/edit.html.erb +1 -1
- data/app/views/grandstand/users/index.html.erb +4 -2
- data/app/views/grandstand/users/new.html.erb +1 -1
- data/app/views/grandstand/users/show.html.erb +7 -4
- data/app/views/layouts/grandstand.html.erb +17 -55
- data/app/views/layouts/{grandstand_login.html.erb → grandstand_minimal.html.erb} +5 -2
- data/app/views/pages/show.html.erb +0 -8
- data/app/views/posts/show.html.erb +1 -1
- data/app/views/shared/404.html.erb +1 -1
- data/config/routes.rb +5 -0
- data/lib/generators/grandstand/install/install_generator.rb +40 -0
- data/lib/generators/grandstand/install/templates/initializer.rb +27 -0
- data/lib/generators/grandstand/install/templates/migration.rb +95 -0
- data/lib/generators/grandstand/install/templates/public/fonts/museosans.eot +0 -0
- data/lib/generators/grandstand/install/templates/public/fonts/museosans.svg +247 -0
- data/lib/generators/grandstand/install/templates/public/fonts/museosans.ttf +0 -0
- data/lib/generators/grandstand/install/templates/public/fonts/museosans.woff +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-input.gif +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-progress-bar.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-progress-complete.gif +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-progress.gif +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/add.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/delete.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/edit.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/bold.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/gallery.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image-center.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image-left.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image-right.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/italic.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/ordered-list.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/quote.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/source.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/strikethrough.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/underline.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/unordered-list.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/error.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/external.png +0 -0
- data/{public/grandstand/images → lib/generators/grandstand/install/templates/public/images/icons}/galleries-empty.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/galleries.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/gallery.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/handle.gif +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/image-library.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/image.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/okay.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/pages.png +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/posts.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/processing.gif +0 -0
- data/lib/generators/grandstand/install/templates/public/images/icons/users.png +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/spinner-dark.gif +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/uploader.swf +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/application.js +27 -21
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/jquery.js +1 -1
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/mustache.js +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/preview.js +0 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/selection.js +1 -1
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/string.js +0 -1
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/wysiwyg.js +8 -9
- data/lib/generators/grandstand/install/templates/public/stylesheets/application.css +368 -0
- data/lib/generators/grandstand/install/templates/public/stylesheets/buttons.css +81 -0
- data/lib/generators/grandstand/install/templates/public/stylesheets/dialog.css +142 -0
- data/lib/generators/grandstand/install/templates/public/stylesheets/forms.css +94 -0
- data/lib/generators/grandstand/install/templates/public/stylesheets/global.css +94 -0
- data/lib/generators/grandstand/install/templates/public/stylesheets/login.css +37 -0
- data/{public/grandstand → lib/generators/grandstand/install/templates/public}/stylesheets/wysiwyg-content.css +1 -0
- data/lib/generators/grandstand/install/templates/public/stylesheets/wysiwyg.css +94 -0
- data/lib/generators/grandstand/install/templates/s3.yml +8 -0
- data/lib/grandstand.rb +78 -16
- data/lib/grandstand/application.rb +1 -10
- data/lib/grandstand/controller.rb +7 -1
- data/lib/grandstand/form_builder.rb +2 -2
- data/lib/grandstand/helper.rb +3 -0
- data/lib/grandstand/session.rb +1 -1
- metadata +143 -101
- data/.gitignore +0 -2
- data/MIT-LICENSE +0 -20
- data/README.markdown +0 -43
- data/README.txt +0 -0
- data/Rakefile +0 -50
- data/VERSION +0 -1
- data/app/helpers/site_helper.rb +0 -2
- data/app/stylesheets/_buttons.less +0 -76
- data/app/stylesheets/application.less +0 -331
- data/app/stylesheets/global.less +0 -452
- data/app/stylesheets/login.less +0 -30
- data/app/stylesheets/wysiwyg.less +0 -108
- data/app/views/grandstand/pages/_left.html.erb +0 -3
- data/app/views/grandstand/posts/_left.html.erb +0 -3
- data/app/views/grandstand/users/_left.html.erb +0 -3
- data/grandstand.gemspec +0 -207
- data/lib/grandstand/stylesheets_controller.rb +0 -14
- data/public/grandstand/images/icons/add.png +0 -0
- data/public/grandstand/images/icons/collapse.png +0 -0
- data/public/grandstand/images/icons/delete.png +0 -0
- data/public/grandstand/images/icons/edit.png +0 -0
- data/public/grandstand/images/icons/expand.png +0 -0
- data/public/grandstand/images/icons/galleries.png +0 -0
- data/public/grandstand/images/icons/gallery.png +0 -0
- data/public/grandstand/images/icons/image.png +0 -0
- data/public/grandstand/images/icons/okay.png +0 -0
- data/public/grandstand/images/icons/pages.png +0 -0
- data/public/grandstand/images/icons/posts.png +0 -0
- data/public/grandstand/images/icons/upload.png +0 -0
- data/public/grandstand/images/icons/users.png +0 -0
- data/public/grandstand/images/logo.png +0 -0
- data/vendor/cache/more-0.1.1.gem +0 -0
@@ -1,16 +1,15 @@
|
|
1
|
-
<%= render :partial => 'left' %>
|
2
1
|
<% content_for :head do -%>
|
3
2
|
<%= stylesheet_link_tag '/grandstand/stylesheets/wysiwyg.css' %>
|
4
3
|
<% end -%>
|
5
4
|
<% wrap_grandstand_form do -%>
|
6
|
-
<div class="field">
|
5
|
+
<!-- <div class="field">
|
7
6
|
<%= form.label :parent_id %>
|
8
|
-
<%#= form.collection_select :parent_id, Page.tree, :id, :tree_name %>
|
9
|
-
</div>
|
7
|
+
<%#= form.collection_select :parent_id, Grandstand::Page.tree, :id, :tree_name %>
|
8
|
+
</div> -->
|
10
9
|
<div class="field">
|
11
10
|
<%= form.label :name %>
|
12
11
|
<%= form.text_field :name, :class => 'oversized text' %>
|
13
|
-
<%= errors_on :
|
12
|
+
<%= form.errors_on :name %>
|
14
13
|
</div>
|
15
14
|
<div class="tabset">
|
16
15
|
<ul class="tabs">
|
@@ -1,9 +1,10 @@
|
|
1
|
-
<tr class="row <%= cycle 'one', 'two' %><%= " child-of-#{page.parent_id}" if page.parent_id %>">
|
1
|
+
<tr class="row <%= cycle 'one', 'two' %><%= " child-of-#{page.parent_id}" if page.parent_id %><%= ' parent' if page.children.empty? %>" id="pages_<%= page.id %>">
|
2
2
|
<td style="padding-left:<%= indent * 10 + 5 %>;"><%= link_to page.name, grandstand_page_path(page) %></td>
|
3
|
-
<td><%= link_to url = page_url(page.url), url %></td>
|
3
|
+
<td><%= link_to url = page_url(page.url), url, :class => 'external icon' %></td>
|
4
4
|
<td class="actions">
|
5
5
|
<%= button_link_to 'Edit', edit_grandstand_page_path(page), :icon => :edit %>
|
6
|
-
<%= button_link_to 'Delete', delete_grandstand_page_path(page), :icon => :delete %>
|
6
|
+
<%= button_link_to 'Delete', delete_grandstand_page_path(page), :class => 'remote', :icon => :delete %>
|
7
7
|
</td>
|
8
|
+
<td class="handle"></td>
|
8
9
|
</tr>
|
9
10
|
<%= render :partial => 'row', :collection => page.children, :as => :page, :locals => {:indent => indent.next} %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% form_for(@page, :as => :page, :html => {:method => :delete}, :url => grandstand_page_path(@page)) do %>
|
3
3
|
<div class="field">You cannot undo this once it's done! This page will be dead. Not undead, like a zombie. Just plain dead.</div>
|
4
4
|
<div class="toolbar">
|
5
|
-
<%= button
|
6
|
-
<%= button_link_to
|
5
|
+
<%= button 'Delete', :default => true %>
|
6
|
+
<%= button_link_to 'Cancel', grandstand_pages_path, :class => 'cancel' %>
|
7
7
|
</div>
|
8
8
|
<% end %>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Cancel', return_path || grandstand_page_path(@page)) %>
|
3
|
+
<% end %>
|
4
|
+
<h2><%= @page.name %></h2>
|
2
5
|
<% form_for(@page, :as => :page, :url => grandstand_page_path(@page)) do |form| -%>
|
3
6
|
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
7
|
<div class="toolbar">
|
5
|
-
<%= button 'Save' %>
|
6
|
-
<%= button_link_to
|
8
|
+
<%= button 'Save', :default => true %>
|
9
|
+
<%= button_link_to 'Cancel', grandstand_pages_path, :class => 'cancel' %>
|
7
10
|
</div>
|
8
11
|
<% end -%>
|
@@ -1,19 +1,22 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Add a Page', new_grandstand_page_path, :icon => 'add') %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<h2>Pages</h2>
|
3
6
|
<% if @pages.empty? -%>
|
4
|
-
<div class="
|
5
|
-
<
|
6
|
-
|
7
|
+
<div class="pad">
|
8
|
+
<h3>You haven't created any pages!</h3>
|
9
|
+
<%= button_link_to('Add One Now?', new_grandstand_page_path, :icon => 'add') %>
|
7
10
|
</div>
|
8
11
|
<% else -%>
|
9
12
|
<table class="grid">
|
10
13
|
<thead>
|
11
14
|
<tr>
|
12
15
|
<th>Name</th>
|
13
|
-
<th colspan="
|
16
|
+
<th colspan="3">URL</th>
|
14
17
|
</tr>
|
15
18
|
</thead>
|
16
|
-
<tbody>
|
19
|
+
<tbody class="sortable pages">
|
17
20
|
<%= render :partial => 'row', :collection => @pages, :as => :page, :locals => {:indent => 0} %>
|
18
21
|
</tbody>
|
19
22
|
</table>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Cancel', return_path || grandstand_page_path(@page)) %>
|
3
|
+
<% end %>
|
4
|
+
<h2>New Page</h2>
|
2
5
|
<%= form_for(@page, :as => :page, :url => grandstand_pages_path) do |form| %>
|
3
6
|
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
7
|
<div class="toolbar">
|
5
|
-
<%= button 'Add Page' %>
|
6
|
-
<%= button_link_to
|
8
|
+
<%= button 'Add Page', :default => true %>
|
9
|
+
<%= button_link_to 'Cancel', grandstand_pages_path, :class => 'cancel' %>
|
7
10
|
</div>
|
8
11
|
<% end =%>
|
@@ -1,3 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Edit', edit_grandstand_page_path(@page), :icon => 'edit') %>
|
3
|
+
<% end %>
|
4
|
+
<h2><%= @page.name %> <%= link_to url = page_url(@page.url), url, :class => 'external icon' %></h2>
|
5
|
+
<% if @page.page_sections.size == 1 -%>
|
6
|
+
<div class="pad">
|
7
|
+
<%= page_content(@page.page_sections.first) %>
|
8
|
+
</div>
|
9
|
+
<% else -%>
|
10
|
+
<div class="tabset pad">
|
11
|
+
<ul class="tabs">
|
12
|
+
<% @page.page_sections.each do |page_section| -%>
|
13
|
+
<li>
|
14
|
+
<a href="#page-section-<%= page_section.id %>"><%= page_section.section.titleize %></a>
|
15
|
+
</li>
|
16
|
+
<% content_for :page_sections do -%>
|
17
|
+
<div class="page-section" id="page-section-<%= page_section.id %>">
|
18
|
+
<%= page_content(page_section) %>
|
19
|
+
</div>
|
20
|
+
<% end -%>
|
21
|
+
<% end -%>
|
22
|
+
</ul>
|
23
|
+
<%= yield :page_sections %>
|
24
|
+
</div>
|
25
|
+
<% end -%>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<%= render :partial => 'left' %>
|
2
1
|
<% content_for :head do -%>
|
3
2
|
<%= stylesheet_link_tag '/grandstand/stylesheets/wysiwyg.css' %>
|
4
3
|
<% end -%>
|
@@ -6,10 +5,9 @@
|
|
6
5
|
<div class="field">
|
7
6
|
<%= form.label :name %>
|
8
7
|
<%= form.text_field :name, :class => 'oversized text' %>
|
9
|
-
<%= form.errors_on(:
|
8
|
+
<%= form.errors_on(:name) %>
|
10
9
|
</div>
|
11
10
|
<div class="field">
|
12
|
-
<%= form.label :body %>
|
13
11
|
<%= form.text_area :body, :class => 'wysiwyg' %>
|
14
12
|
</div>
|
15
13
|
<% end -%>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<td><%= post.posted_at.to_date %>
|
19
19
|
<td class="actions">
|
20
20
|
<%= button_link_to 'Edit', edit_grandstand_post_path(post), :icon => :edit %>
|
21
|
-
<%= button_link_to 'Delete', delete_grandstand_post_path(post), :icon => :delete %>
|
21
|
+
<%= button_link_to 'Delete', delete_grandstand_post_path(post), :class => 'remote', :icon => :delete %>
|
22
22
|
</td>
|
23
23
|
</tr>
|
24
24
|
<% end -%>
|
@@ -1,9 +1,8 @@
|
|
1
|
-
<%= render :partial => 'left' %>
|
2
1
|
<h2>Are you sure you want to do this?</h2>
|
3
2
|
<% form_for(@post, :as => :post, :html => {:method => :delete}, :url => grandstand_post_path(@post)) do %>
|
4
3
|
<div class="field">You cannot undo this once it's done! This post, and all the creative ideas therein, will be gone forever.</div>
|
5
4
|
<div class="toolbar">
|
6
|
-
<%= button
|
5
|
+
<%= button 'Delete', :default => true %>
|
7
6
|
<%= button_link_to('Cancel', grandstand_posts_path, :class => 'cancel') %>
|
8
7
|
</div>
|
9
8
|
<% end %>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Cancel', return_path || grandstand_post_path(@post)) %>
|
3
|
+
<% end %>
|
4
|
+
<h2><%= @post.name %></h2>
|
2
5
|
<%= form_for(@post, :as => :post, :html => {:method => :put}, :url => grandstand_post_path(@post)) do |form| %>
|
3
6
|
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
7
|
<div class="toolbar">
|
5
|
-
<%= button 'Save' %>
|
8
|
+
<%= button 'Save', :default => true %>
|
6
9
|
<%= button_link_to('Cancel', return_path || grandstand_posts_path, :class => 'cancel') %>
|
7
10
|
</div>
|
8
11
|
<% end =%>
|
@@ -1,9 +1,14 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<% if blog_images = Grandstand::Gallery.where(:published => false).first -%>
|
3
|
+
<%= button_link_to('Image Library', grandstand_gallery_path(blog_images), :icon => 'image-library') %>
|
4
|
+
<% end -%>
|
5
|
+
<%= button_link_to('Add a Post', new_grandstand_post_path, :icon => 'add') %>
|
6
|
+
<% end %>
|
7
|
+
<h2>Blog Posts</h2>
|
3
8
|
<% if @posts.empty? -%>
|
4
|
-
<div class="
|
5
|
-
<
|
6
|
-
|
9
|
+
<div class="pad">
|
10
|
+
<h3>You haven't written any posts!</h3>
|
11
|
+
<%= button_link_to('Add One Now?', new_grandstand_post_path, :icon => 'add') %>
|
7
12
|
</div>
|
8
13
|
<% else -%>
|
9
14
|
<%= render :partial => 'list', :locals => {:posts => @posts} %>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Cancel', return_path || grandstand_post_path(@post)) %>
|
3
|
+
<% end %>
|
4
|
+
<h2>New Blog Post</h2>
|
2
5
|
<% form_for(@post, :as => :post, :url => grandstand_posts_path) do |form| -%>
|
3
6
|
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
7
|
<div class="toolbar">
|
5
|
-
<%= button 'Add Post' %>
|
8
|
+
<%= button 'Add Post', :default => true %>
|
6
9
|
<%= button_link_to('Cancel', grandstand_posts_path, :class => 'cancel') %>
|
7
10
|
</div>
|
8
11
|
<% end -%>
|
@@ -1,8 +1,6 @@
|
|
1
|
-
|
2
|
-
<h1 class="posts icon">
|
3
|
-
<%= @post.name %>
|
1
|
+
<% content_for :title do %>
|
4
2
|
<%= button_link_to('Edit', edit_grandstand_post_path(@post), :icon => 'edit') %>
|
5
3
|
<%= button_link_to('Delete', delete_grandstand_post_path(@post), :class => 'remote', :icon => 'delete') %>
|
6
|
-
|
7
|
-
<
|
4
|
+
<% end %>
|
5
|
+
<h2><%= @post.name %> <%= link_to url = post_url(@post.posted_at.year, @post.posted_at.month, @post.url), url, :class => 'external icon' %></h2>
|
8
6
|
<%= raw @post.body %>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<
|
1
|
+
<h2>Forgot Password</h2>
|
2
2
|
<% form_tag(reset_grandstand_session_path) do %>
|
3
3
|
<p>
|
4
4
|
<label for="email">E-mail</label>
|
5
5
|
<%= text_field_tag(:email, '', :class => 'oversized text') %>
|
6
6
|
</p>
|
7
|
-
<%= button 'Reset Password', :
|
7
|
+
<%= button 'Reset Password', :default => true %> <%= button_link_to 'Return to Log In', grandstand_session_path %>
|
8
8
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<
|
1
|
+
<h2>Log In</h2>
|
2
2
|
<% form_tag(grandstand_session_path) do %>
|
3
3
|
<p>
|
4
4
|
<label for="email">E-mail</label>
|
@@ -8,5 +8,5 @@
|
|
8
8
|
<label for="password">Password</label>
|
9
9
|
<%= password_field_tag(:password, '', :class => 'oversized text') %>
|
10
10
|
</p>
|
11
|
-
<%= button 'Log In', :
|
11
|
+
<%= button 'Log In', :default => true %> <%= button_link_to 'Forgot Your Password?', forgot_grandstand_session_path %>
|
12
12
|
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Powered by <a href="http://grandstand.x451.com/">Grandstand</a> from <a href="http://x451.com">Flip Sasser</a>
|
@@ -3,14 +3,18 @@
|
|
3
3
|
<%= form.label :first_name %>
|
4
4
|
<%= form.text_field :first_name, :class => 'half oversized text' %>
|
5
5
|
<%= form.text_field :last_name, :class => 'half oversized text' %>
|
6
|
-
<%= form.errors_on
|
6
|
+
<%= form.errors_on :first_name %>
|
7
7
|
</div>
|
8
8
|
<div class="field">
|
9
9
|
<%= form.label :email %>
|
10
10
|
<%= form.text_field :email, :class => 'text' %>
|
11
11
|
</div>
|
12
12
|
<div class="field">
|
13
|
-
<%= form.label :password %>
|
14
|
-
<%= form.
|
13
|
+
<%= form.label :password, @user.new_record? ? nil : 'New password' %>
|
14
|
+
<%= form.password_field :password, :autocomplete => 'off', :class => 'text' %>
|
15
|
+
</div>
|
16
|
+
<div class="field">
|
17
|
+
<%= form.label :password_confirmation, 'Password (again!)' %>
|
18
|
+
<%= form.password_field :password_confirmation, :autocomplete => 'off', :class => 'text' %>
|
15
19
|
</div>
|
16
20
|
<% end -%>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
You cannot undo this once it's done! This user will be gone, and so will their posts and galleries. Be careful! This could have dire effects.
|
5
5
|
</div>
|
6
6
|
<div class="toolbar">
|
7
|
-
<%= button('Delete') %>
|
7
|
+
<%= button('Delete', :default => true) %>
|
8
8
|
<%= button_link_to('Cancel', grandstand_users_path, :class => 'cancel') %>
|
9
9
|
</div>
|
10
10
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% form_for(@user, :as => :user, :url => grandstand_user_path(@user)) do |form| -%>
|
3
3
|
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
4
|
<div class="toolbar">
|
5
|
-
<%= button 'Save' %>
|
5
|
+
<%= button 'Save', :default => true %>
|
6
6
|
<%= button_link_to('Cancel', grandstand_users_path, :class => 'cancel') %>
|
7
7
|
</div>
|
8
8
|
<% end -%>
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Add a User', new_grandstand_user_path, :class => 'remote', :icon => 'add') %>
|
3
|
+
<% end %>
|
4
|
+
<h2>Users</h2>
|
3
5
|
<table class="grid">
|
4
6
|
<thead>
|
5
7
|
<tr>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% form_for(@user, :as => :user, :url => grandstand_users_path) do |form| -%>
|
3
3
|
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
4
|
<div class="toolbar">
|
5
|
-
<%= button 'Add User' %>
|
5
|
+
<%= button 'Add User', :default => true %>
|
6
6
|
<%= button_link_to('Cancel', grandstand_users_path, :class => 'cancel') %>
|
7
7
|
</div>
|
8
8
|
<% end -%>
|
@@ -1,11 +1,14 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<% content_for :title do %>
|
2
|
+
<%= button_link_to('Edit', edit_grandstand_user_path(@user), :class => 'remote', :icon => 'edit') %>
|
3
|
+
<%= button_link_to('Delete', delete_grandstand_user_path(@user), :class => 'remote', :icon => 'delete') unless @user.id == current_user.id %>
|
4
|
+
<% end %>
|
5
|
+
<h2><%= @user.name %></h2>
|
3
6
|
<% unless @user.posts.empty? -%>
|
4
|
-
<
|
7
|
+
<h3>Blog Posts</h3>
|
5
8
|
<%= render :partial => 'grandstand/posts/list', :locals => {:posts => @user.posts} %>
|
6
9
|
<% end -%>
|
7
10
|
<% unless @user.galleries.empty? -%>
|
8
|
-
<
|
11
|
+
<h3>Galleries</h3>
|
9
12
|
<div class="galleries">
|
10
13
|
<%= render :partial => 'grandstand/galleries/list', :locals => {:galleries => @user.galleries} %>
|
11
14
|
</div>
|
@@ -5,71 +5,33 @@
|
|
5
5
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
6
6
|
<title>Grandstand Admin</title>
|
7
7
|
<%= javascript_include_tag('/grandstand/javascripts/jquery', '/grandstand/javascripts/application') %>
|
8
|
-
<%= stylesheet_link_tag('/grandstand/stylesheets/
|
8
|
+
<%= stylesheet_link_tag('/grandstand/stylesheets/application') %>
|
9
9
|
<%= csrf_meta_tag %>
|
10
10
|
<%= yield :head %>
|
11
11
|
</head>
|
12
12
|
<body class="grandstand">
|
13
13
|
<%= render :partial => 'grandstand/shared/flash', :locals => {:flash => flash} %>
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<
|
19
|
-
|
20
|
-
|
21
|
-
</div>
|
14
|
+
<h1 id="logo"><%= link_to('Grandstand', grandstand_root_path) %></h1>
|
15
|
+
<ul id="menu">
|
16
|
+
<li id="posts"><%= link_to 'Posts', grandstand_posts_path, active_on(:controller => :posts) %></li>
|
17
|
+
<li id="galleries"><%= link_to 'Galleries', grandstand_galleries_path, active_on(:controller => %w(galleries images)) %></li>
|
18
|
+
<li id="pages"><%= link_to 'Pages', grandstand_pages_path, active_on(:controller => :pages) %></li>
|
19
|
+
<li id="users"><%= link_to 'Users', grandstand_users_path, active_on(:controller => :users) %></li>
|
20
|
+
</ul>
|
22
21
|
</div>
|
23
22
|
<div id="content">
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<li<%= expand(:posts, :class => 'first') %>>
|
28
|
-
<%= expand_link(:posts) unless no_posts = Grandstand::Post.count.zero? %>
|
29
|
-
<%= link_to('Blog Posts', grandstand_posts_path) %>
|
30
|
-
<% unless no_posts -%>
|
31
|
-
<ul>
|
32
|
-
<% Grandstand::Post.limit(10).each do |post| -%>
|
33
|
-
<li><%= link_to(post.name, grandstand_post_path(post)) %></li>
|
34
|
-
<% end -%>
|
35
|
-
</ul>
|
36
|
-
<% end -%>
|
37
|
-
</li>
|
38
|
-
<li<%= expand(:galleries, :images) %>>
|
39
|
-
<%= expand_link(:galleries) unless no_galleries = Grandstand::Gallery.count.zero? %>
|
40
|
-
<%= link_to('Galleries', grandstand_galleries_path) %>
|
41
|
-
<% unless no_galleries -%>
|
42
|
-
<ul>
|
43
|
-
<% Grandstand::Gallery.limit(10).each do |gallery| -%>
|
44
|
-
<li><%= link_to(gallery.name, grandstand_gallery_path(gallery)) %></li>
|
45
|
-
<% end -%>
|
46
|
-
</ul>
|
47
|
-
<% end -%>
|
48
|
-
</li>
|
49
|
-
<% if false -%>
|
50
|
-
<li<%= expand(:pages) %>>
|
51
|
-
<%= expand_link(:pages) %>
|
52
|
-
<%= link_to('Pages', grandstand_pages_path) %>
|
53
|
-
<% unless Page.roots.count.zero? -%>
|
54
|
-
<ul>
|
55
|
-
<% Grandstand::Page.roots.limit(10).each do |page| -%>
|
56
|
-
<li><%= link_to(page.name, grandstand_page_path(page)) %></li>
|
57
|
-
<% end -%>
|
58
|
-
</ul>
|
59
|
-
<% end -%>
|
60
|
-
</li>
|
61
|
-
<% end -%>
|
62
|
-
<li class="last">
|
63
|
-
<%= link_to('Users', grandstand_users_path) %>
|
64
|
-
</li>
|
65
|
-
</ul>
|
23
|
+
<% unless (title = yield(:title)).blank? -%>
|
24
|
+
<div id="toolbar">
|
25
|
+
<%= title %>
|
66
26
|
</div>
|
67
|
-
|
68
|
-
|
27
|
+
<% end -%>
|
28
|
+
<%= yield %>
|
29
|
+
<div id="footer">
|
30
|
+
<%= render :partial => 'grandstand/shared/footer' %> |
|
31
|
+
<%= link_to('View Site', '/', :class => 'external') %> |
|
32
|
+
<%= link_to('Logout', grandstand_session_path, :method => :delete) %>
|
69
33
|
</div>
|
70
34
|
</div>
|
71
|
-
<div id="footer">
|
72
|
-
</div>
|
73
35
|
<div id="cover" style="display:none;"></div>
|
74
36
|
<div id="dialog" style="display:none;"></div>
|
75
37
|
</body>
|
@@ -5,13 +5,16 @@
|
|
5
5
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
6
6
|
<title><% if current_page %><%= current_page.title %> - <% end %>Grandstand</title>
|
7
7
|
<%= javascript_include_tag('/grandstand/javascripts/jquery', '/grandstand/javascripts/application') %>
|
8
|
-
<%= stylesheet_link_tag('/grandstand/stylesheets/
|
8
|
+
<%= stylesheet_link_tag('/grandstand/stylesheets/login') %>
|
9
9
|
</head>
|
10
10
|
<body class="grandstand">
|
11
11
|
<%= render :partial => 'grandstand/shared/flash', :locals => {:flash => flash} %>
|
12
|
-
|
12
|
+
<h1 id="logo"><%= link_to(Grandstand.app_name, grandstand_root_path) %></h1>
|
13
13
|
<div class="inset" id="login">
|
14
14
|
<%= yield %>
|
15
|
+
<div id="footer">
|
16
|
+
<%= render :partial => 'grandstand/shared/footer' %>
|
17
|
+
</div>
|
15
18
|
</div>
|
16
19
|
</body>
|
17
20
|
</html>
|