updated readme

This commit is contained in:
Mike Kelley
2011-08-27 01:41:48 -06:00
commit 17fee3c6d5
98 changed files with 11421 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<div class="module">
<div class="module_header"><%= action_name.humanize %> Category</div>
<div class="module_subheader smaller"></div>
<div class="module_body">
<%= form_for @category do |f| %>
<% if @category.errors.any? %>
<% flash.now[:error] = @category.errors.full_messages.join(', and ') %>
<% end %>
<div class="fieldset">
<span class="label indent smaller">
<%= f.label :title %><br />
<small>(Required)</small>
</span>
<span class="input indent smaller"><%= f.text_field :title, :size => 75 %></span>
<div class="clear"></div>
</div>
<div class="fieldset">
<span class="label indent smaller">
<%= f.label :position %>
</span>
<span class="input indent smaller"><%= f.text_field :position %></span>
<div class="clear"></div>
</div>
<div class="fieldset">
<span class="label indent smaller"></span>
<span class="input indent smaller">
<%= f.check_box :state %>
<%= f.label :state %>
</span>
<div class="clear"></div>
</div>
</div>
<div class="module_footer">
<div class="fieldset">
<span class="input"><%= f.submit "submit" %> or <%= link_to "cancel", forums_path %></span>
<div class="clear"></div>
</div>
</div>
<% end %>
</div>
</div>

View File

@@ -0,0 +1 @@
<%= render :partial => 'form' %>

View File

@@ -0,0 +1,47 @@
<div class="right controls"><%= link_to "New Forum Category", new_category_path if can? :create, Category %></div>
<% @categories.each do |category| %>
<div class="module">
<div class="module_header">
<%= category.title %>
<span class="controls right smaller">
<%= link_to "New Forum", new_forum_path if can? :create, Forum %>
<%= link_to "Edit Category", edit_category_path(category) if can? :manage, category %>
<%= link_to "Delete Category", category_path(category), :confirm => "Are you sure you want to delete this category?", :method => :delete if can? :manage, category %>
</span>
</div>
<% if category.forums.size > 0 %>
<div>
<table>
<tr class="smaller">
<th colspan="2" align="left">Forum</th>
<th>Topics</th>
<th>Posts</th>
<th class="last_post" align="left">Last Post</th>
</tr>
<% category.forums.each do |forum| %>
<tr>
<td class="icon"><%= image_tag 'ruby.png' %></td>
<td class="description">
<%= link_to forum.title, forum_path(forum) %><br />
<span class="smaller"><%= forum.description %></span><br />
</td>
<td class="counts smaller"><%= forum.topics.size %></td>
<td class="counts smaller"><%= forum.posts.size - forum.topics.size %></td>
<td class="last_post smaller">
<% if forum.posts.size > 0 %>
<%= forum.posts.last.created_at %><br />
<%= forum.posts.last.user.username %>
<% else %>
No Topics / Posts
<% end %>
</td>
</tr>
<% end %>
</table>
</div>
<% else %>
<div class="module_body">There are currently no forums.</div>
<% end %>
</div>
<% end %>

View File

@@ -0,0 +1 @@
<%= render :partial => 'form' %>