Merge branch 'obj_auth' into announcement_dev_view_and_auth

This commit is contained in:
Matthew Kaito Juyuan Fu committed 2012-02-12 23:24:50 +08:00
commit c88e1c8419
15 files changed
+342 -123

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
class Post
include Mongoid::Document
include Mongoid::Timestamps
include OrbitCoreLib::ObjectAuthable
field :title, :type => String
field :body, :type => String
embeds_many :comments
@@ -21,6 +21,7 @@
<tr>
<td><%= post.title %></td>
<td><%= truncate(post.body,:length=>15) %></td>
<td><%= link_to t('blog.new_auth'), init_admin_object_auths_path("Post",post) %></td>
<td><%= link_to t('blog.show'), panel_new_blog_back_end_post_path(post) %></td>
<td><%= link_to t('blog.edit'), edit_panel_new_blog_back_end_post_path(post) %></td>
<td><%= link_to t('blog.delete'), panel_new_blog_back_end_post_path(post), :confirm => t('blog.sure?'), :method => :delete %></td>
@@ -7,7 +7,7 @@
<%= flash_messages %>
<h1><%= t('blog.new_post') %></h1>
<%= form_for @post, :url => panel_new_blog_back_end_posts_path do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<%= f.text_field :title, :class => 'text' %>
<% end %>
<%= link_back %>