Skip to content

Commit

Permalink
show page kind: templatized or redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
did committed Jul 7, 2011
1 parent 711110a commit b2ddaf8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/models/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Page
scope :not_found, :where => { :slug => '404', :depth => 0 }
scope :published, :where => { :published => true }
scope :fullpath, lambda { |fullpath| { :where => { :fullpath => fullpath } } }
scope :minimal_attributes, :only => %w(title slug fullpath position depth published templatized listed parent_id created_at updated_at)
scope :minimal_attributes, :only => %w(title slug fullpath position depth published templatized redirect listed parent_id created_at updated_at)

## methods ##

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/pages/_page.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?}"}
%li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?} #{'redirect' if page.redirect?}"}

- children = can?(:manage, page) ? page.children : page.children.find_all { |p| !p.templatized? }

Expand Down
6 changes: 3 additions & 3 deletions doc/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ x admin role is not correctly set when creating a new website
x the required star for file field is not shown
x Rights to set roles (ticket #104)
x export: problems with templatized pages (source => multi levels pages)
- do not rename files for fonts
- test and/or convert existing templates (the 2 of the themes section)
x do not rename files for fonts
x icon for redirection page in the pages section (back-office)
- tooltip to explain the difference between 1.) Admin 2.) Author 3.) Designer?
- test and/or convert existing templates (the 2 of the themes section)

- overide sort for contents
- icon for redirection page in the pages section (back-office)
- [bushido] guiders / welcome page / devise cas authentication (SSO)


Expand Down
Binary file added public/images/admin/list/icons/redirect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/admin/list/icons/template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 15 additions & 8 deletions public/stylesheets/admin/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we
cursor: move;
}

#pages-list ul.folder li.templatized em {
background-position: left -62px;
cursor: pointer;
}

#pages-list li .toggler {
position: absolute;
top: 9px;
Expand All @@ -183,7 +178,7 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we

#pages-list li strong a {
position: relative;
top: 3px;
top: 2px;
text-decoration: none;
color: #1f82bc;
font-size: 0.9em;
Expand All @@ -195,12 +190,24 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we

#pages-list li.hidden strong a { font-style: italic; font-weight: normal; }

#pages-list ul.folder li.templatized strong a {
padding-right: 24px;
background: transparent url(/images/admin/list/icons/template.png) no-repeat right 2px;
}

#pages-list ul.folder li.redirect strong a {
padding-right: 24px;
background: transparent url(/images/admin/list/icons/redirect.png) no-repeat right 1px;
}

#pages-list li .more {
position: absolute;
top: 6px;
top: 0px;
right: 20px;
font-size: 0.7em;
color: #8b8d9a;
height: 31px;
line-height: 31px;
}

#pages-list li .more a {
Expand All @@ -211,7 +218,7 @@ ul.theme-assets li.hidden strong a { font-style: italic; color: #8B8D9A; font-we
}

#pages-list li.not-found { border-top: 1px dotted #bbbbbd; padding-top: 10px; margin-left: 0px; }
#pages-list li.not-found .more { top: 16px; }
#pages-list li.not-found .more { top: 10px; }

/* ___ Progress bar ___ */

Expand Down

0 comments on commit b2ddaf8

Please sign in to comment.