<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,8 @@
 == Change Log
 
 === 0.6.8 Incise
+* Hide page publish date selector unless page.edit.published_date? config is 
+set. [Sean Cribbs]
 * Add &lt;r:yield /&gt; tag to support snippets that accept blocks. [Andrew Neil]
 * Fix bug with FileNotFoundPage subclasses and draft status. [cradle]
 * Update radiant:freeze:edge task to support BRANCH, TAG, and REVISION. [John </diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -63,10 +63,11 @@
                     %label{:for=&gt;&quot;page_status_id&quot;}
                       Status
                     = select &quot;page&quot;, &quot;status_id&quot;, Status.find_all.map { |s| [s.name, s.id] }, {}
-                  %p#publication-date{:style =&gt; &quot;display: none&quot;}
-                    %label{:for=&gt;&quot;page_published_at&quot;}
-                      Published At
-                    = datetime_select &quot;page&quot;, &quot;published_at&quot;, :disabled =&gt; true
+                  - if @config['page.edit.published_date?']
+                    %p#publication-date{:style =&gt; &quot;display: none&quot;}
+                      %label{:for=&gt;&quot;page_published_at&quot;}
+                        Published At
+                      = datetime_select &quot;page&quot;, &quot;published_at&quot;, :disabled =&gt; true
                   = render_region :layout_row
                 %span.clear &amp;nbsp;
               - parts_bottom.edit_timestamp do</diff>
      <filename>app/views/admin/page/edit.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -55,16 +55,18 @@ document.observe('dom:loaded', function() {
     });
   });
 
-  when('page_status_id', function(select){
-    if($F('page_status_id') == '100')
-      $('publication-date').show().select('select').invoke('enable');
-
-    select.observe('change', function(){
-      if($F(this) == '100')
+  when('publication-date', function(pub_date){
+    if($('page_status_id')) {
+      if($F('page_status_id') == '100')
         $('publication-date').show().select('select').invoke('enable');
-      else
-        $('publication-date').hide().select('select').invoke('disable');
-    })
+
+      $('page_status_id').observe('change', function(){
+        if($F(this) == '100')
+          $('publication-date').show().select('select').invoke('enable');
+        else
+          $('publication-date').hide().select('select').invoke('disable');
+      })
+    }
   });
 
   when('notice', function(notice) {</diff>
      <filename>public/javascripts/admin/admin.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>28f91d73722c8eea4e80a41a57eb06af3559d722</id>
    </parent>
  </parents>
  <author>
    <name>Sean Cribbs</name>
    <email>seancribbs@gmail.com</email>
  </author>
  <url>http://github.com/radiant/radiant/commit/d05e66fe25e5a0e48ddeaf4734ba3a83548668b4</url>
  <id>d05e66fe25e5a0e48ddeaf4734ba3a83548668b4</id>
  <committed-date>2008-07-27T13:47:16-07:00</committed-date>
  <authored-date>2008-07-27T13:47:16-07:00</authored-date>
  <message>Hide page publish date selector unless page.edit.published_date? config is set.</message>
  <tree>ed2dde09e7f2e38d700e944e43af38d930cf7684</tree>
  <committer>
    <name>Sean Cribbs</name>
    <email>seancribbs@gmail.com</email>
  </committer>
</commit>
