grandstand 0.2.7 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. data/Gemfile +6 -0
  2. data/README.md +72 -0
  3. data/app/controllers/galleries_controller.rb +4 -0
  4. data/app/controllers/grandstand/galleries_controller.rb +10 -1
  5. data/app/controllers/grandstand/images_controller.rb +9 -3
  6. data/app/controllers/grandstand/main_controller.rb +2 -4
  7. data/app/controllers/grandstand/pages_controller.rb +8 -1
  8. data/app/controllers/grandstand/sessions_controller.rb +1 -1
  9. data/app/helpers/grandstand/main_helper.rb +17 -0
  10. data/app/models/grandstand/gallery.rb +2 -1
  11. data/app/models/grandstand/image.rb +1 -0
  12. data/app/models/grandstand/page.rb +4 -0
  13. data/app/models/grandstand/page_section.rb +2 -0
  14. data/app/models/grandstand/post.rb +2 -0
  15. data/app/models/grandstand/user.rb +6 -4
  16. data/app/views/grandstand/galleries/delete.html.erb +2 -2
  17. data/app/views/grandstand/galleries/edit.html.erb +1 -1
  18. data/app/views/grandstand/galleries/editor.html.erb +3 -3
  19. data/app/views/grandstand/galleries/index.html.erb +5 -5
  20. data/app/views/grandstand/galleries/new.html.erb +1 -1
  21. data/app/views/grandstand/galleries/show.html.erb +11 -10
  22. data/app/views/grandstand/images/_form.html.erb +1 -1
  23. data/app/views/grandstand/images/delete.html.erb +2 -2
  24. data/app/views/grandstand/images/edit.html.erb +2 -2
  25. data/app/views/grandstand/images/new.html.erb +2 -2
  26. data/app/views/grandstand/images/show.html.erb +2 -2
  27. data/app/views/grandstand/main/index.html.erb +8 -10
  28. data/app/views/grandstand/pages/_form.html.erb +4 -5
  29. data/app/views/grandstand/pages/_row.html.erb +4 -3
  30. data/app/views/grandstand/pages/delete.html.erb +2 -2
  31. data/app/views/grandstand/pages/edit.html.erb +6 -3
  32. data/app/views/grandstand/pages/index.html.erb +10 -7
  33. data/app/views/grandstand/pages/new.html.erb +6 -3
  34. data/app/views/grandstand/pages/show.html.erb +25 -3
  35. data/app/views/grandstand/posts/_form.html.erb +1 -3
  36. data/app/views/grandstand/posts/_list.html.erb +1 -1
  37. data/app/views/grandstand/posts/delete.html.erb +1 -2
  38. data/app/views/grandstand/posts/edit.html.erb +5 -2
  39. data/app/views/grandstand/posts/index.html.erb +10 -5
  40. data/app/views/grandstand/posts/new.html.erb +5 -2
  41. data/app/views/grandstand/posts/show.html.erb +3 -5
  42. data/app/views/grandstand/sessions/forgot.html.erb +2 -2
  43. data/app/views/grandstand/sessions/show.html.erb +2 -2
  44. data/app/views/grandstand/shared/_footer.html.erb +1 -0
  45. data/app/views/grandstand/users/_form.html.erb +7 -3
  46. data/app/views/grandstand/users/delete.html.erb +1 -1
  47. data/app/views/grandstand/users/edit.html.erb +1 -1
  48. data/app/views/grandstand/users/index.html.erb +4 -2
  49. data/app/views/grandstand/users/new.html.erb +1 -1
  50. data/app/views/grandstand/users/show.html.erb +7 -4
  51. data/app/views/layouts/grandstand.html.erb +17 -55
  52. data/app/views/layouts/{grandstand_login.html.erb → grandstand_minimal.html.erb} +5 -2
  53. data/app/views/pages/show.html.erb +0 -8
  54. data/app/views/posts/show.html.erb +1 -1
  55. data/app/views/shared/404.html.erb +1 -1
  56. data/config/routes.rb +5 -0
  57. data/lib/generators/grandstand/install/install_generator.rb +40 -0
  58. data/lib/generators/grandstand/install/templates/initializer.rb +27 -0
  59. data/lib/generators/grandstand/install/templates/migration.rb +95 -0
  60. data/lib/generators/grandstand/install/templates/public/fonts/museosans.eot +0 -0
  61. data/lib/generators/grandstand/install/templates/public/fonts/museosans.svg +247 -0
  62. data/lib/generators/grandstand/install/templates/public/fonts/museosans.ttf +0 -0
  63. data/lib/generators/grandstand/install/templates/public/fonts/museosans.woff +0 -0
  64. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-input.gif +0 -0
  65. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-progress-bar.png +0 -0
  66. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-progress-complete.gif +0 -0
  67. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/background-progress.gif +0 -0
  68. data/lib/generators/grandstand/install/templates/public/images/icons/add.png +0 -0
  69. data/lib/generators/grandstand/install/templates/public/images/icons/delete.png +0 -0
  70. data/lib/generators/grandstand/install/templates/public/images/icons/edit.png +0 -0
  71. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/bold.png +0 -0
  72. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/gallery.png +0 -0
  73. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image-center.png +0 -0
  74. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image-left.png +0 -0
  75. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image-right.png +0 -0
  76. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/image.png +0 -0
  77. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/italic.png +0 -0
  78. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/ordered-list.png +0 -0
  79. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/quote.png +0 -0
  80. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/source.png +0 -0
  81. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/strikethrough.png +0 -0
  82. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/underline.png +0 -0
  83. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/editor/unordered-list.png +0 -0
  84. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/error.png +0 -0
  85. data/lib/generators/grandstand/install/templates/public/images/icons/external.png +0 -0
  86. data/{public/grandstand/images → lib/generators/grandstand/install/templates/public/images/icons}/galleries-empty.png +0 -0
  87. data/lib/generators/grandstand/install/templates/public/images/icons/galleries.png +0 -0
  88. data/lib/generators/grandstand/install/templates/public/images/icons/gallery.png +0 -0
  89. data/lib/generators/grandstand/install/templates/public/images/icons/handle.gif +0 -0
  90. data/lib/generators/grandstand/install/templates/public/images/icons/image-library.png +0 -0
  91. data/lib/generators/grandstand/install/templates/public/images/icons/image.png +0 -0
  92. data/lib/generators/grandstand/install/templates/public/images/icons/okay.png +0 -0
  93. data/lib/generators/grandstand/install/templates/public/images/icons/pages.png +0 -0
  94. data/lib/generators/grandstand/install/templates/public/images/icons/posts.png +0 -0
  95. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/icons/processing.gif +0 -0
  96. data/lib/generators/grandstand/install/templates/public/images/icons/users.png +0 -0
  97. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/spinner-dark.gif +0 -0
  98. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/images/uploader.swf +0 -0
  99. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/application.js +27 -21
  100. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/jquery.js +1 -1
  101. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/mustache.js +0 -0
  102. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/preview.js +0 -0
  103. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/selection.js +1 -1
  104. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/string.js +0 -1
  105. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/javascripts/wysiwyg.js +8 -9
  106. data/lib/generators/grandstand/install/templates/public/stylesheets/application.css +368 -0
  107. data/lib/generators/grandstand/install/templates/public/stylesheets/buttons.css +81 -0
  108. data/lib/generators/grandstand/install/templates/public/stylesheets/dialog.css +142 -0
  109. data/lib/generators/grandstand/install/templates/public/stylesheets/forms.css +94 -0
  110. data/lib/generators/grandstand/install/templates/public/stylesheets/global.css +94 -0
  111. data/lib/generators/grandstand/install/templates/public/stylesheets/login.css +37 -0
  112. data/{public/grandstand → lib/generators/grandstand/install/templates/public}/stylesheets/wysiwyg-content.css +1 -0
  113. data/lib/generators/grandstand/install/templates/public/stylesheets/wysiwyg.css +94 -0
  114. data/lib/generators/grandstand/install/templates/s3.yml +8 -0
  115. data/lib/grandstand.rb +78 -16
  116. data/lib/grandstand/application.rb +1 -10
  117. data/lib/grandstand/controller.rb +7 -1
  118. data/lib/grandstand/form_builder.rb +2 -2
  119. data/lib/grandstand/helper.rb +3 -0
  120. data/lib/grandstand/session.rb +1 -1
  121. metadata +143 -101
  122. data/.gitignore +0 -2
  123. data/MIT-LICENSE +0 -20
  124. data/README.markdown +0 -43
  125. data/README.txt +0 -0
  126. data/Rakefile +0 -50
  127. data/VERSION +0 -1
  128. data/app/helpers/site_helper.rb +0 -2
  129. data/app/stylesheets/_buttons.less +0 -76
  130. data/app/stylesheets/application.less +0 -331
  131. data/app/stylesheets/global.less +0 -452
  132. data/app/stylesheets/login.less +0 -30
  133. data/app/stylesheets/wysiwyg.less +0 -108
  134. data/app/views/grandstand/pages/_left.html.erb +0 -3
  135. data/app/views/grandstand/posts/_left.html.erb +0 -3
  136. data/app/views/grandstand/users/_left.html.erb +0 -3
  137. data/grandstand.gemspec +0 -207
  138. data/lib/grandstand/stylesheets_controller.rb +0 -14
  139. data/public/grandstand/images/icons/add.png +0 -0
  140. data/public/grandstand/images/icons/collapse.png +0 -0
  141. data/public/grandstand/images/icons/delete.png +0 -0
  142. data/public/grandstand/images/icons/edit.png +0 -0
  143. data/public/grandstand/images/icons/expand.png +0 -0
  144. data/public/grandstand/images/icons/galleries.png +0 -0
  145. data/public/grandstand/images/icons/gallery.png +0 -0
  146. data/public/grandstand/images/icons/image.png +0 -0
  147. data/public/grandstand/images/icons/okay.png +0 -0
  148. data/public/grandstand/images/icons/pages.png +0 -0
  149. data/public/grandstand/images/icons/posts.png +0 -0
  150. data/public/grandstand/images/icons/upload.png +0 -0
  151. data/public/grandstand/images/icons/users.png +0 -0
  152. data/public/grandstand/images/logo.png +0 -0
  153. 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 :page, :name %>
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('Delete') %>
6
- <%= button_link_to('Cancel', grandstand_pages_path, :class => 'cancel') %>
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
- <h1 class="pages icon"><%= @page.name %></h1>
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('Cancel', grandstand_pages_path, :class => 'cancel') %>
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
- <%= render :partial => 'left' %>
2
- <h1 class="pages icon">Pages</h1>
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="inset">
5
- <h2>You haven't created any pages!</h2>
6
- <b class="grey">Get started:</b> <%= button_link_to('Add a Page', new_grandstand_page_path, :icon => 'add') %>
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="2">URL</th>
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
- <h1 class="pages icon">New Page</h1>
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('Cancel', grandstand_pages_path, :class => 'cancel') %>
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
- <%= render :partial => 'left' %>
2
- <h1 class="pages icon"><%= @page.name %> <%= button_link_to('Edit', edit_grandstand_page_path(@page), :icon => 'edit') %></h1>
3
- <div class="quiet"><%= link_to url = page_url(@page.url), url %></div>
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(:post, :name) %>
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('Delete') %>
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
- <h1 class="posts icon"><%= @post.name %></h1>
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
- <%= render :partial => 'left' %>
2
- <h1 class="posts icon">Blog Posts</h1>
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="inset">
5
- <h2>You haven't written any posts!</h2>
6
- <b class="grey">Get started:</b> <%= button_link_to('Add a Post', new_grandstand_post_path, :icon => 'add') %>
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
- <h1 class="posts icon">New Blog Post</h1>
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
- <%= render :partial => 'left' %>
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
- </h1>
7
- <div class="quiet"><%= link_to url = post_url(@post.posted_at.year, @post.posted_at.month, @post.url), url %></div>
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
- <h1>Forgot Password</h1>
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', :class => 'grey' %> <%= button_link_to 'Return to Log In', grandstand_session_path %>
7
+ <%= button 'Reset Password', :default => true %> <%= button_link_to 'Return to Log In', grandstand_session_path %>
8
8
  <% end %>
@@ -1,4 +1,4 @@
1
- <h1>Log In</h1>
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', :class => 'grey' %> <%= button_link_to 'Forgot Your Password?', forgot_grandstand_session_path %>
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(:user, :first_name) %>
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.text_field :password, :autocomplete => 'off', :class => 'text' %>
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
- <%= render :partial => 'left' %>
2
- <h1 class="users icon">Users</h1>
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
- <%= render :partial => 'left' %>
2
- <h1 class="users icon"><%= @user.name %> <%= button_link_to('Edit', edit_grandstand_user_path(@user), :class => 'remote', :icon => 'edit') %></h1>
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
- <h2>Blog Posts</h2>
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
- <h2>Galleries</h2>
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/global', '/grandstand/stylesheets/application') %>
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
- <div id="header">
15
- <div class="float-left">
16
- <%= link_to(image_tag('/grandstand/images/logo.png', :alt => Grandstand.app_name), grandstand_root_path, :id => 'logo') %>
17
- </div>
18
- <div class="float-right">
19
- <%= link_to('View Site', '/', :target => :new) %>
20
- <%= link_to('Logout', grandstand_session_path, :method => :delete) %>
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
- <div id="left">
25
- <%= yield :left %>
26
- <ul>
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
- <div id="main">
68
- <%= yield %>
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/global', '/grandstand/stylesheets/login') %>
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
- <%= link_to(image_tag('/grandstand/images/logo.png', :alt => Grandstand.app_name), grandstand_root_path, :id => 'logo') %>
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>