From e9418758513fea6a83f63d31ecac316fdb6fc151 Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 27 Apr 2009 16:11:47 +0200 Subject: seperated admin overview into partials. included recent changes --- app/views/admin/_drafts.html.erb | 25 +++++++++++++++++++++++++ app/views/admin/_recent_changes.html.erb | 24 ++++++++++++++++++++++++ app/views/admin/index.html.erb | 25 +++---------------------- 3 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 app/views/admin/_drafts.html.erb create mode 100644 app/views/admin/_recent_changes.html.erb (limited to 'app/views/admin') diff --git a/app/views/admin/_drafts.html.erb b/app/views/admin/_drafts.html.erb new file mode 100644 index 0000000..abda588 --- /dev/null +++ b/app/views/admin/_drafts.html.erb @@ -0,0 +1,25 @@ +

Drafts (<%= @drafts.size %>)

+
+ + + + + + + + + <% @drafts.each do |draft| %> + + + + + + + + <% end %> +
IDTitlePathauthor
<%= draft.id %><%= draft.title %><%= draft.node.unique_name %><%= draft.user.login rescue "" %> + <%= link_to 'Show', node_path(draft.node) %> + <%= link_to "Revisions", :controller => :revisions, :action => :diff, :id => draft.node.id %> + <%= link_to "Publish", publish_node_path(draft.node), :method => :put, :confirm => "Do you really want to publish?" %> +
+
\ No newline at end of file diff --git a/app/views/admin/_recent_changes.html.erb b/app/views/admin/_recent_changes.html.erb new file mode 100644 index 0000000..1bb14a6 --- /dev/null +++ b/app/views/admin/_recent_changes.html.erb @@ -0,0 +1,24 @@ +

Recent Changes

+
+ + + + + + + + + <% @recent_changes.each do |node| %> + + + + + + + + <% end %> +
Titlepathuserdate
<%= node.draft.try(:title) %><%= node.unique_name %><%= node.draft.user.login rescue "" %><%= node.updated_at.to_s(:db) %> + <%= link_to 'Show', node_path(node) %> + <%= link_to "Revisions", revision_path(:id => node.id) %> +
+
\ No newline at end of file diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index b40f92a..cf33774 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb @@ -1,22 +1,3 @@ -
-

Drafts

- - - - - - - - <% @drafts.each do |draft| %> - - - - - - - - - - <% end %> -
IDTitlePathLocked by
<%= draft.id %><%= draft.title %><%= draft.node.unique_name %><%= draft.node.lock_owner.login rescue "" %><%= link_to 'Show', node_path(draft.node) %><%= link_to "Diff revisions", :controller => :revisions, :action => :diff, :id => draft.node.id %><%= link_to "Publish", publish_node_path(draft.node), :method => :put, :confirm => "Do you really want to publish?" %>
-
\ No newline at end of file +<%= render :partial => 'drafts' %> + +<%= render :partial => 'recent_changes' %> \ No newline at end of file -- cgit v1.3