Unlock blog post functionality

master
Nick Sergeant 2012-05-25 11:05:47 -04:00
parent 59fa26b56b
commit 809d8c6771
2 changed files with 4 additions and 16 deletions

View File

@ -178,9 +178,6 @@ class PrivateSniptResource(ModelResource):
bundle.data['tags_list'] = bundle.data.get('tags')
bundle.data['tags'] = ''
if not request.user.is_staff:
bundle.data['blog_post'] = False
return super(PrivateSniptResource, self).obj_create(bundle, request,
user=request.user, **kwargs)
@ -192,9 +189,6 @@ class PrivateSniptResource(ModelResource):
bundle.data['tags_list'] = ''
bundle.data['tags'] = ''
if not request.user.is_staff:
bundle.data['blog_post'] = False
return super(PrivateSniptResource, self).obj_update(bundle, request,
user=request.user, **kwargs)

View File

@ -50,16 +50,10 @@
<input type="checkbox" <% if (snipt.public) { %>checked="checked"<% } %> name="" value="" />
<span>Public</span>
</label>
{% endverbatim %}
{% if request.user.is_staff %}
{% verbatim %}
<label class="blog-post is-blog-post">
<input type="checkbox" <% if (snipt.blog_post) { %>checked="checked"<% } %> name="" value="" />
<span>Blog post</span>
</label>
{% endverbatim %}
{% endif %}
{% verbatim %}
<label class="blog-post is-blog-post">
<input type="checkbox" <% if (snipt.blog_post) { %>checked="checked"<% } %> name="" value="" />
<span>Blog post</span>
</label>
<label class="tags">
<span>Tags</span>
<textarea><%= snipt.tags_list %></textarea>