Merge branch 'obj_auth' into announcement_dev_view_and_auth
This commit is contained in:
commit
c88e1c8419
15 files changed
+342
-123
No files matched your search
@@ -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
|
||||
|
||||
+1
@@ -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>
|
||||
|
||||
+1
-1
@@ -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 %>
|
||||
Reference in new issue
Block a user