Skip to content

Commit

Permalink
Styled advanced page options, changed toggle to slideToggle
Browse files Browse the repository at this point in the history
  • Loading branch information
joemsak authored and parndt committed May 20, 2010
1 parent 8b23528 commit 91eb032
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 66 deletions.
2 changes: 1 addition & 1 deletion public/javascripts/refinery/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ var page_options = {
show_options: function(){
$('#toggle_advanced_options').click(function(e){
e.preventDefault();
$('#more_options').toggle();
$('#more_options').slideToggle();
});
},

Expand Down
30 changes: 30 additions & 0 deletions public/stylesheets/refinery/refinery.css
Original file line number Diff line number Diff line change
Expand Up @@ -1125,4 +1125,34 @@ input.button:active, a.button:active{
}
.form-actions a.button {
margin-left: 4px;
}

/* ## Advanced Page Options --------------------------------------------- */
#more_options{
overflow:hidden;
}
.hemisquare{
padding:10px;
margin:0 5px;
border:1px solid #ddd;
float:left;
width:435px;
font:normal 1em "Helvetica Neue", Helvetica, Verdana, sans-serif !important;
}
.hemisquare input[type=text], .hemisquare textarea{
width:90%;
border:1px solid #666;
}

.hemisquare label{
margin:0;
}

.hemisquare .field{
margin:0 0 20px;
}

.hemisquare small{
font-size:0.9em;
color:#999;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,53 @@
<a href="#" id="toggle_advanced_options" rel="Click to access meta tag settings and menu options">&raquo; Hide/Show Advanced Options</a>
</p>
<div id='more_options' style="display:none;">
<div class='field'>
<%= f.label :parent_id %>
<%= f.collection_select :parent_id, @pages_for_parents_list, :id, :indented_title, :include_blank => true %>
</div>
<div class='field'>
<%= label_tag :custom_title %>
<%= label_tag "", 'Type:', :class => "stripped" %>
<% ["none", "text"].each do |type| %>
<%= f.radio_button :custom_title_type, "#{type}" %>
<%= label_tag "page_custom_title_type_#{type}", "#{type.titleize}", :class => "stripped" %>
<% end %>
<br/>
<div id='custom_title_none'></div>
<div id='custom_title_text' style='display: <%= @page.custom_title_type == 'text' ? 'block' : 'none' %>'>
<p>
<%= f.text_field :custom_title, {:size => 103} %><br/>
<small>
If you want the page to have a different title than the one that shows in the menu and browser title then enter it here.<br/>
</small>
</p>
<div class="hemisquare">
<div class='field'>
<%= f.label :parent_id %>
<%= f.collection_select :parent_id, @pages_for_parents_list, :id, :indented_title, :include_blank => true %>
</div>
</div>
<div class='field'>
<%= label_tag :skip_to_first_child? %>
<%= f.check_box :skip_to_first_child %>
<%= f.label :skip_to_first_child, "Check this box if you want the visitor to be redirected to this page's first child page if this page is selected.", :class => "stripped" %>
</div>
<div class='field'>
<%= f.label :link_url, "Custom URL" %>
<%= f.text_field :link_url, {:size => 103} %><br/>
<small>
Enter a URL if this page links to an external site or to a pre-existing resource e.g. a contact page.
<div class='field'>
<%= label_tag :custom_title %>
<%= label_tag "", 'Type:', :class => "stripped" %>
<% ["none", "text"].each do |type| %>
<%= f.radio_button :custom_title_type, "#{type}" %>
<%= label_tag "page_custom_title_type_#{type}", "#{type.titleize}", :class => "stripped" %>
<% end %>
<br/>
Note: This URL must point to a location that exists; a new one will not be created.
</small>
</div>

<%= render :partial => "form_advanced_options_seo", :locals => {:f => f} if RefinerySetting.find_or_set(:pages_advanced_options_include_seo, true) %>

<div class='field'>
<%= f.label :show_in_menu %>
<%= f.check_box :show_in_menu %>
<small>
<%= f.label :show_in_menu, "Check this box if this page should appear in the site menu" %>
</small>
<div id='custom_title_none'></div>
<div id='custom_title_text' style='display: <%= @page.custom_title_type == 'text' ? 'block' : 'none' %>'>
<p>
<%= f.text_field :custom_title, {:size => 103} %><br/>
<small>
If you want the page to have a different title than the one that shows in the menu and browser title then enter it here.<br/>
</small>
</p>
</div>
</div>
<div class='field'>
<%= label_tag :skip_to_first_child? %>
<%= f.check_box :skip_to_first_child %>
<%= f.label :skip_to_first_child, "Check this box if you want the visitor to be redirected to this page's first child page if this page is selected.", :class => "stripped" %>
</div>
<div class='field'>
<%= f.label :link_url, "Custom URL" %>
Enter a URL if this page links to an external site or to a pre-existing resource e.g. a contact page.
<%= f.text_field :link_url, {:size => 103} %><br/>
<small>
Note: This URL must point to a location that exists; a new one will not be created.
</small>
</div>
<div class='field'>
<%= f.label :show_in_menu %>
<%= f.check_box :show_in_menu %>
<small>
<%= f.label :show_in_menu, "Check this box if this page should appear in the site menu" %>
</small>
</div>
</div>

<%= render :partial => "form_advanced_options_seo", :locals => {:f => f} if RefinerySetting.find_or_set(:pages_advanced_options_include_seo, true) %>

</div>
<div class='field'>
<label>Draft</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<h2>Search Engine Optimization</h2>
<div class='field'>
<%= f.label :browser_title %>
<%= f.text_field :browser_title, :size => 63 %><br/>
<small>
If you want to override the default browser title, do it here.
</small>
</div>
<div class='field'>
<%= f.label :meta_keywords %>
<%= f.text_field :meta_keywords, :size => 63 %><br/>
<small>
Enter 5-10 keywords that relate to this page. Separate keywords by a comma.
</small>
</div>
<div class='field'>
<%= f.label :meta_description %>
<%= f.text_area :meta_description, :cols => 95, :rows => 3 %><br/>
<small>
Enter a concise two or three sentences describing what this page is about.
</small>
</div>
<div class="hemisquare">
<h2>Search Engine Optimization</h2>
<div class='field'>
<%= f.label :browser_title %>
<%= f.text_field :browser_title, :size => 63 %><br/>
<small>
If you want to override the default browser title, do it here.
</small>
</div>
<div class='field'>
<%= f.label :meta_keywords %>
<%= f.text_field :meta_keywords, :size => 63 %><br/>
<small>
Enter 5-10 keywords that relate to this page. Separate keywords by a comma.
</small>
</div>
<div class='field'>
<%= f.label :meta_description %>
<%= f.text_area :meta_description, :cols => 95, :rows => 3 %><br/>
<small>
Enter a concise two or three sentences describing what this page is about.
</small>
</div>
</div>

0 comments on commit 91eb032

Please sign in to comment.