This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made dashboard nicer, added quick post plugin to add widget to submit…
… blog posts easily on dashboard
- Loading branch information
Josh Adams
committed
Jan 29, 2009
1 parent
5219700
commit e4aa710
Showing
10 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module DashboardHelper | ||
def render_dashboard_box dashboard_box | ||
render :partial => 'shared/render_dashboard_box', :locals => { :dashboard_box => dashboard_box } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
<%= title "Dashboard" %> | ||
|
||
<% Ansuz::PluginManagerInstance.admin_dashboard_boxes.each do |dashboard_box| %> | ||
<% render :layout => 'shared/dashboard_box', :locals => { :title => dashboard_box[0] } do %> | ||
<%= render :partial => dashboard_box[1] %> | ||
<div class='twocol'> | ||
<% Ansuz::PluginManagerInstance.admin_dashboard_boxes.in_groups(2).each_with_index do |half, i| %> | ||
<div class='col <%= "left" if i==0 %>'> | ||
<% half.compact.each do |dashboard_box| %> | ||
<%= render_dashboard_box dashboard_box %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<div class='clear'></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<% render :layout => 'shared/dashboard_box', :locals => { :title => dashboard_box[0] } do %> | ||
<%= render :partial => dashboard_box[1] %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
vendor/plugins/ansuz_blog/app/views/admin/blog_posts/_new.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<% form_for :blog_post, :url => admin_blog_posts_path, :html => { :class => 'blog-post-form' } do |f| -%> | ||
<%= render :partial => '/admin/blog_posts/form', :locals => { :f => f } -%> | ||
<% if local_assigns.include?(:is_quickpost) && is_quickpost %> | ||
<%= hidden_field_tag :quick_post, true %> | ||
<% end %> | ||
<%= submit_tag("Create Post") -%> or <%= link_to "Cancel", admin_blog_posts_path -%> | ||
<% end -%> |
2 changes: 2 additions & 0 deletions
2
vendor/plugins/ansuz_blog/app/views/admin/blog_posts/new.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...lugins/ansuz_quick_post_dashboard_widget/app/views/admin/quick_posts/_quick_post.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<% | ||
# nasty, required because of fckeditor_textarea's failings or my lack of understanding | ||
@blog_post = Ansuz::JAdams::BlogPost.new | ||
%> | ||
<%= render :partial => 'admin/blog_posts/new', :locals => { :is_quickpost => true } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add a box to the admin dashboard from which to quick-post | ||
Ansuz::PluginManagerInstance.register_admin_dashboard_box("Quick Post", 'admin/quick_posts/quick_post') |