Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved page removale into a popup

  • Loading branch information...
commit 08d48be25a65e086620bc26bce19c301e626681b 1 parent 7dd09b0
@jlong jlong authored
View
51 stylesheets/admin/partials/_popup.sass
@@ -2,30 +2,49 @@ div.popup
color: #333
background-color: white
border: 1px solid #777
- padding: 0 10px
+ padding: 10px 20px
font-size: 90%
+
.busy
float: right
margin-top: 9px
+
h3.title
- background: #ecf4ff
- border-bottom: 1px solid #bcd8f4
+ background: #c5dff5
+ +linear-gradient(color_stops(#e5f5ff, #c5dff5))
+ border-bottom: 1px solid #a7cdf0
font-size: 120%
- margin: 0 -10px 10px -10px
+ margin: -10px -20px 20px -20px
padding: 6px 10px
+
label
display: block
font-size: 90%
&.inline
display: inline
+
input.button
font-size: 120%
+
+ .viewport
+ background: white
+ border: 1px solid #ddd
+ border-top: 1px solid #ccc
+ border-left: 1px solid #ccc
+ +box-shadow(#fff, 1px, 1px, 0)
+ height: 200px
+ margin: 1em 0
+ overflow: auto
+ table.index
+ margin-top: -1px
+
.buttons
font-size: 90%
+ margin-top: 1.5em
input.button
font-size: 130%
- .tag_description,
- .snippet_description
+
+ .tag_description, .snippet_description
border-bottom: 1px dotted silver
font-size: 95%
padding: 12px 0
@@ -47,6 +66,7 @@ div.popup
font-family: Monaco, "Courier New", Courier, monospace
overflow: hidden
padding: 10px
+
.reference
font-size: 90%
border: 1px solid silver
@@ -102,6 +122,7 @@ div.popup
margin: 0
margin-top: 1em
margin-bottom: 1em
+
.close_link
text-align: center
@@ -114,4 +135,20 @@ div.popup .reference table
h2, h3, h4
color: black
margin: 0
- margin-bottom: .5em
+
+div.popup.textured
+ background: #eee
+
+ .head
+ background: white
+ padding: 10px 20px
+ margin: -20px -20px 20px
+ border-bottom: 1px solid #ccc
+ +box-shadow(#fff, 0, 1px, 0)
+
+ .buttons
+ border-top: 1px solid white
+ margin: 20px -20px -10px
+ padding: 20px
+ +box-shadow(#ccc, 0, -1px, 0)
View
4 views/admin/_layout.haml
@@ -42,6 +42,10 @@
- tabs[@selected].each do |tab|
%li= link_to tab.proper_name, tab.url, :class=>(tab.name == @selected ? 'current' : nil)
= yield :toolbar
+ - if /pages|layouts|snippets|stylesheets|javascripts|users|extensions/.match(request.url)
+ .right
+ %form.search
+ %input{:type=>"search", :name=>"q", :placeholder=>"Search", :results=>0, :size=>30, :value=>params[:q]}/
#main
= yield :flash_message
#content
View
34 views/admin/pages/index.haml
@@ -1,7 +1,6 @@
- @selected = :pages
- @title = 'Pages - Radiant CMS - Publishing for Small Teams'
-
.outset
%table.index#pages
%thead
@@ -24,7 +23,7 @@
%a{:href => "/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_0.children_visible#page_1
%td.name{:style=>"padding-left: 9px"}
%span.w1
@@ -37,7 +36,7 @@
%a{:href => "/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_0.children_visible#page_1
%td.name{:style=>"padding-left: 9px"}
%span.w1
@@ -50,7 +49,7 @@
%a{:href => "/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_0.children_visible#page_1
%td.name{:style=>"padding-left: 9px"}
%span.w1
@@ -63,7 +62,7 @@
Draft
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
- when params[:q]
%tr
%td{:class=>"empty", :colspan=>"3"} No Results
@@ -80,7 +79,7 @@
%a{:href => "/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_1.no_children.virtual#page_2
%td.name{:style=>"padding-left: 32px"}
%span.w1
@@ -94,7 +93,7 @@
%a{:href => "/file-not-found/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_1.no_children#page_3
%td.name{:style=>"padding-left: 32px"}
%span.w1
@@ -107,7 +106,7 @@
%a{:href => "/about/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_1.children_visible#page_4
%td.name{:style=>"padding-left: 32px"}
%span.w1
@@ -122,7 +121,7 @@
%a{:href => "/articles/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_2.no_children.virtual#page_5
%td.name{:style=>"padding-left: 55px"}
%span.w1
@@ -136,7 +135,7 @@
%a{:href => "/articles/2008/02/21/monthly-archives/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_2.no_children#page_6
%td.name{:style=>"padding-left: 55px"}
%span.w1
@@ -149,7 +148,7 @@
%a{:href => "/articles/2006/06/09/first-post/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_2.no_children#page_7
%td.name{:style=>"padding-left: 55px"}
%span.w1
@@ -162,7 +161,7 @@
%a{:href => "/articles/2006/06/10/second-post/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_2.no_children#page_8
%td.name{:style=>"padding-left: 55px"}
%span.w1
@@ -175,7 +174,7 @@
%a{:href => "/articles/2008/02/21/third-post/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_2.no_children#page_9
%td.name{:style=>"padding-left: 55px"}
%span.w1
@@ -187,7 +186,7 @@
%span.status.draft_status Draft
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_1.no_children#page_9
%td.name{:style=>"padding-left: 32px"}
%span.w1
@@ -199,7 +198,7 @@
%span.status.hidden_status Hidden
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_1.no_children#page_10
%td.name{:style=>"padding-left: 32px"}
%span.w1
@@ -212,7 +211,7 @@
%a{:href => "/rss/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%tr.page.level_1.no_children#page_11
%td.name{:style=>"padding-left: 32px"}
%span.w1
@@ -225,7 +224,7 @@
%a{:href => "/styles.css/"} Published
%td.actions
= link_to image('plus.png') + " Add Child", "#add_child_dropdown", :class=>"action dropdown"
- = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action"
+ = link_to image('minus.png') + " Remove", "/admin/pages/remove", :class=>"action popup"
%div{:style=>"display: none"}
%ul.menu#add_child_dropdown
@@ -236,5 +235,6 @@
%li= link_to "Archive Month Index", "/admin/pages/new"
%li= link_to "Archive Year Index", "/admin/pages/new"
%li= link_to "File Not Found", "/admin/pages/new"
+
- sleep(1)
View
39 views/admin/pages/remove.haml
@@ -1,39 +0,0 @@
-- @selected = :pages
-
-%h1 Remove Pages
-
-%p Are you sure you want to <strong class="warning">permanently remove</strong> the following pages?
-
-%table#pages.index
- %tbody
- %tr.page.level_0.children_visible#page_4
- %td.name{:style=>"padding-left: 4px"}
- %span.w1
- %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
- %span.title Articles
- %tr.page.level_1.no_children.virtual#page_10
- %td.name{:style=>"padding-left: 26px"}
- %span.w1
- %img.icon{:src=>"/images/admin/virtual_page.png", :alt=>"", :title=>""}/
- %span.title %B %Y Archives
- %tr.page.level_1.no_children#page_5
- %td.name{:style=>"padding-left: 26px"}
- %span.w1
- %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
- %span.title First Post
- %tr.page.level_1.no_children#page_6
- %td.name{:style=>"padding-left: 26px"}
- %span.w1
- %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
- %span.title Second Post
- %tr.page.level_1.no_children#page_8
- %td.name{:style=>"padding-left: 26px"}
- %span.w1
- %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
- %span.title Third Post
-
-%form{:method=>"post", :action=>"/admin/pages/index_after_pages_removed.haml"}
- %p.buttons
- %input.button{:type=>"submit", :value=>"Delete Pages"}/
- or
- %a{:href=>"/admin/pages"} Cancel
View
1  views/admin/pages/remove/_layout.haml
@@ -0,0 +1 @@
+= yield
View
42 views/admin/pages/remove/index.haml
@@ -0,0 +1,42 @@
+- popup_id = "remove_pages_popup_#{Time.now.to_i}"
+
+.popup.textured{:id=>popup_id}
+ %form{:method=>"post", :action=>"/admin/pages/index_after_pages_removed.haml"}
+ %h3.title.warn Remove Pages
+
+ .head
+ %p Are you sure you want to <strong class="warning">permanently remove</strong> the following pages?
+
+ .viewport
+ %table#pages.index
+ %tbody
+ %tr.page.level_0.children_visible#page_4
+ %td.name{:style=>"padding-left: 4px"}
+ %span.w1
+ %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
+ %span.title Articles
+ %tr.page.level_1.no_children.virtual#page_10
+ %td.name{:style=>"padding-left: 26px"}
+ %span.w1
+ %img.icon{:src=>"/images/admin/virtual_page.png", :alt=>"", :title=>""}/
+ %span.title %B %Y Archives
+ %tr.page.level_1.no_children#page_5
+ %td.name{:style=>"padding-left: 26px"}
+ %span.w1
+ %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
+ %span.title First Post
+ %tr.page.level_1.no_children#page_6
+ %td.name{:style=>"padding-left: 26px"}
+ %span.w1
+ %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
+ %span.title Second Post
+ %tr.page.level_1.no_children#page_8
+ %td.name{:style=>"padding-left: 26px"}
+ %span.w1
+ %img.icon{:src=>"/images/admin/page.png", :alt=>"", :title=>""}/
+ %span.title Third Post
+
+ .buttons
+ %input.button{:type=>"submit", :value=>"Delete Pages"}/
+ or
+ %a.cancel{:href=>"javascript: Element.closePopup('#{popup_id}')"} Cancel
Please sign in to comment.
Something went wrong with that request. Please try again.