<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>schema/migrations/003_add_model_assets.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -7,6 +7,7 @@
   - Image uploading(&amp; thumbnailing) via attachment_fu
   - Write articles in Textile, Markdown, or HTML
   - Users may vote on comments (no registration required)
+  - Comments may use Textile and are proteted using Whistler
   - completely UJS using JQuery
   - RESTful architecture
 
@@ -19,6 +20,7 @@
   - RedCloth
   - CodeRay
   - merb\_can\_filter
+  - whistler
   - image_science
   
 ### Get Started - clone,configure,migrate</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -3,14 +3,15 @@ class Application &lt; Merb::Controller
   include AuthenticatedSystem
   include GlobalMixin
   
-  before :articles
+  before :sidebar
   
   private
   
-  def articles
+  def sidebar
     if logged_in?
       @articles = Article.find :all, :order =&gt; 'published_at DESC'
       @assets = Asset.find :all, :conditions =&gt; &quot;parent_id IS NULL&quot;, :order =&gt; &quot;created_at DESC&quot;
+      @comments_count = Comment.count :all
     else
       Article.with_published do
         @articles = Article.find :all, :order =&gt; 'published_at DESC'</diff>
      <filename>app/controllers/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,9 +3,7 @@ class Articles &lt; Application
   
   before :login_required, :exclude =&gt; [:index, :show]
   #before :basic_authentication, :exclude =&gt; [:index, :show]
-  
   before :layout
-  before :articles
   
   def index
     display @articles</diff>
      <filename>app/controllers/articles.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,8 @@
 class Asset &lt; ActiveRecord::Base
-
-  # Associations
-  belongs_to :attachable, :polymorphic =&gt; true
   
   # Plugins
   has_attachment :storage =&gt; :file_system, 
-    :thumbnails =&gt; { :large =&gt; '300x300!', :med =&gt; '160x160!', :small =&gt; '75x75!', :thumb =&gt; '50x50!', :tiny =&gt; '40x40!', :micro =&gt; '30x30!' }, 
+    :thumbnails =&gt; { :banner =&gt; '660x140!', :ver =&gt; '300x500&gt;', :hor =&gt; '500x300&gt;', :large =&gt; '300x300!', :med =&gt; '160x160!', :small =&gt; '75x75!', :thumb =&gt; '50x50!' }, 
     :max_size =&gt; 5.megabytes,
     :path_prefix =&gt; &quot;public/uploads/assets&quot;,
     :content_type =&gt; :image</diff>
      <filename>app/models/asset.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,48 +1,3 @@
-&lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
-  
-  #asset_form{
-  padding:15px 30px 30px 30px;
-  background:#eee;
-  }
-  #images ul{
-  list-style-type:none;
-  padding:0;
-  margin:0;
-  }
-  #images li{
-  float:left;
-  margin:5px;
-  padding:0;
-  }
-  #images a img{
-  border:1px solid #aaa;
-  padding:4px;
-  display:block;
-  }
-  #images a img:hover{
-  border-color:blue;
-  }
-  li.asset{
-    position:relative;
-  }
-  .asset_panel{
-  position:absolute;
-  bottom:5px;
-  right:5px;
-  background:#fff;
-  font-size:10px;
-  padding-top:3px;
-  padding-left:5px;
-  }
-  .asset_panel a{
-  font-weight:300;
-  text-decoration:none;
-  }
-  a.del{
-  color:red;
-  }
-&lt;/style&gt;
-
 &lt;% form_for :asset, :action =&gt; url(:assets), :multipart =&gt; true do %&gt;
 	&lt;%= file_control :uploaded_data, :label =&gt; &quot;Upload Asset&quot; %&gt;
 	&lt;input name=&quot;commit&quot; type=&quot;submit&quot; value=&quot;Upload&quot; /&gt;</diff>
      <filename>app/views/assets/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
-&lt;img src=&quot;&lt;%#= @asset.public_filename %&gt;&quot; /&gt;
+&lt;img src=&quot;&lt;%= @asset.public_filename :banner %&gt;&quot; /&gt;
+&lt;img src=&quot;&lt;%= @asset.public_filename :ver %&gt;&quot; /&gt;
+&lt;img src=&quot;&lt;%= @asset.public_filename :hor %&gt;&quot; /&gt;
 &lt;img src=&quot;&lt;%= @asset.public_filename :large %&gt;&quot; /&gt;
 &lt;img src=&quot;&lt;%= @asset.public_filename :med %&gt;&quot; /&gt;
 &lt;img src=&quot;&lt;%= @asset.public_filename :small %&gt;&quot; /&gt;
 &lt;img src=&quot;&lt;%= @asset.public_filename :thumb %&gt;&quot; /&gt;
-&lt;img src=&quot;&lt;%= @asset.public_filename :tiny %&gt;&quot; /&gt;
-&lt;img src=&quot;&lt;%= @asset.public_filename :micro %&gt;&quot; /&gt;
 
 &lt;p&gt;
   &lt;b&gt;Filename:&lt;/b&gt;</diff>
      <filename>app/views/assets/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,53 +1,22 @@
-&lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
-  #sbar h3{
-  border-bottom:1px dotted #ccc;
-  }
-  #sbar ul{
-  list-style-type:none;
-  padding:0;
-  }
-  #article_list li{
-  padding:4px 0;
-  }
-  .article_btn{
-
-  }
-  li a.title{
-  font-family:Arial;
-  font-size:12px;
-  color:#666;
-  text-decoration:none;
-  }
-  
-  #asset_list li{
-  float:left;
-  padding-right:4px; 
-  }
-  .btn{
-  clear:both;
-  text-decoration:none;
-  }
-  .draft{
-  color:red;
-  }
-&lt;/style&gt;
-
-&lt;div id=&quot;article_list&quot;&gt;
-  &lt;h3&gt;Articles(&lt;%= @articles.length %&gt;) - &lt;%= link_to 'new', &quot;/articles/new&quot;, :class =&gt; 'btn' %&gt;&lt;/h3&gt;
+&lt;div id=&quot;article_list&quot; class=&quot;listing&quot;&gt;
+  &lt;h2&gt;&lt;a href=&quot;/articles&quot;&gt;Articles&lt;/a&gt; &lt;%= @articles.length %&gt; &lt;%= link_to 'new', &quot;/articles/new&quot;, :class =&gt; 'btn' %&gt;&lt;/h2&gt;
   &lt;% unless @articles.empty? %&gt;
     &lt;ul&gt;
     &lt;% for article in @articles %&gt;
-      &lt;li&gt;&lt;%= '&lt;span class=&quot;draft&quot;&gt;draft - &lt;/span&gt;' unless article.published_at %&gt;&lt;%= link_to article.title, &quot;/articles/#{article.to_param}&quot;, :class =&gt; 'title' %&gt; -
-      &lt;%= link_to 'edit', &quot;/articles/#{article.to_param}/edit&quot; %&gt; |
-      &lt;%= link_to 'destroy', &quot;/articles/#{article.to_param}&quot;, :class =&gt; 'delete' %&gt;&lt;/li&gt;
+      &lt;li&gt;
+        &lt;%= '&lt;span class=&quot;draft&quot;&gt;draft - &lt;/span&gt;' unless article.published_at %&gt;&lt;%= link_to article.title, &quot;/articles/#{article.to_param}&quot;, :class =&gt; 'title' %&gt;
+        &lt;span class=&quot;btns&quot;&gt;
+          &lt;%= link_to 'edit', &quot;/articles/#{article.to_param}/edit&quot; %&gt; |
+          &lt;%= link_to 'destroy', &quot;/articles/#{article.to_param}&quot;, :class =&gt; 'delete' %&gt;
+        &lt;/span&gt;
+      &lt;/li&gt;
     &lt;% end %&gt;
     &lt;/ul&gt;
   &lt;% end %&gt;
 &lt;/div&gt;
 
-
-&lt;div id=&quot;asset_list&quot;&gt;
-  &lt;h3&gt;Assets(&lt;%= @assets.length %&gt;) - &lt;%= link_to 'manage', &quot;/assets&quot;, :class =&gt; 'btn' %&gt;&lt;/h3&gt;
+&lt;div id=&quot;asset_list&quot; class=&quot;listing&quot;&gt;
+  &lt;h2&gt;&lt;a href=&quot;/assets&quot;&gt;Assets&lt;/a&gt; &lt;%= @assets.length %&gt; &lt;%#= link_to 'add', &quot;/assets&quot;, :class =&gt; 'btn' %&gt;&lt;/h2&gt;
   &lt;% unless @assets.empty? %&gt;
     &lt;ul&gt;
     &lt;% for asset in @assets %&gt;
@@ -56,3 +25,7 @@
     &lt;/ul&gt;
   &lt;% end %&gt;
 &lt;/div&gt;
+
+&lt;div id=&quot;comment_list&quot; class=&quot;listing&quot;&gt;
+  &lt;h2&gt;&lt;a href=&quot;/comments&quot;&gt;Comments&lt;/a&gt; &lt;%= @comments_count %&gt; &lt;%#= link_to 'review', &quot;/comments&quot;, :class =&gt; 'btn right' %&gt;&lt;/h2&gt;
+&lt;/div&gt;
\ No newline at end of file</diff>
      <filename>app/views/shared/_admin_sbar.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -17,8 +17,12 @@ $(document).ready(function() {
      
      //RESTful delete
      if ($(event.target).is('a.delete')) {
-       $('&lt;form method=&quot;POST&quot; style=&quot;display:none&quot;&gt;&lt;/form&gt;').attr('action', event.target.href ).html('&lt;input type=&quot;hidden&quot; name=&quot;_method&quot; value=&quot;delete&quot; /&gt;').appendTo(&quot;body&quot;)[0].submit();
-       return false;
+       if (confirm(&quot;Oops! Do you really mean to delete?&quot;)) {
+         $('&lt;form method=&quot;POST&quot; style=&quot;display:none&quot;&gt;&lt;/form&gt;').attr('action', event.target.href ).html('&lt;input type=&quot;hidden&quot; name=&quot;_method&quot; value=&quot;delete&quot; /&gt;').appendTo(&quot;body&quot;)[0].submit();
+         return false;
+       }else{
+         return false;
+       }
      }
    
   });</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -59,4 +59,106 @@
   }
   #comments_list td.body{
   width:50%;
+  }
+  
+/*-----------------------------------
+  Admin - Sidebar (needs cleanup)
+-----------------------------------*/
+  
+  #sbar h2{
+  border-bottom:1px dotted #ccc;
+  color:#aaa;
+  position:relative;
+  }
+  #sbar h2 a{
+  color:#000;
+  text-decoration:none;
+  }
+  #sbar ul{
+  list-style-type:none;
+  padding:0;
+  }
+  #article_list li{
+  padding:4px 0;
+  }
+  li a.title{
+  font-family:Arial;
+  font-size:14px;
+  color:#333;
+  text-decoration:none;
+  }
+  #asset_list li{
+  float:left;
+  padding-right:4px; 
+  }
+  a.btn{
+  clear:both;
+  text-decoration:none;
+  color:#2244FF;
+  position:absolute;
+  right:0;
+  }
+  #article_list li{
+  position:relative;
+  }
+  .btns{
+  position:absolute;
+  right:0;
+  font-size:10px;
+  }
+  .btns a{
+  text-decoration:none;
+  }
+  .draft{
+  color:#c00;
+  font-weight:bold;
+  }
+  .listing{
+  clear:both;
+  margin-bottom:15px;
+  }
+
+/*-----------------------------------
+  Admin - Asset Uploader (needs cleanup)
+-----------------------------------*/ 
+  
+  #asset_form{
+  padding:15px 30px 30px 30px;
+  background:#eee;
+  }
+  #images ul{
+  list-style-type:none;
+  padding:0;
+  margin:0;
+  }
+  #images li{
+  float:left;
+  margin:5px;
+  padding:0;
+  }
+  #images a img{
+  border:1px solid #aaa;
+  padding:4px;
+  display:block;
+  }
+  #images a img:hover{
+  border-color:#24F;
+  }
+  li.asset{
+  position:relative;
+  }
+  .asset_panel{
+  position:absolute;
+  bottom:5px;
+  right:5px;
+  background:#fff;
+  font-size:10px;
+  padding-top:3px;
+  padding-left:5px;
+  }
+  .asset_panel a{
+  text-decoration:none;
+  }
+  a.del{
+  color:#E24;
   }
\ No newline at end of file</diff>
      <filename>public/stylesheets/admin.css</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,25 @@ helpers
 .left{float:left}
 .right{float:right}
 
+
+/*-----------------------------------
+image classes
+-----------------------------------*/
+.center{
+text-align:center;
+}
+img.border{
+padding:5px; 
+border:1px solid #ccc;
+}
+img.matte{
+padding:10px 10px 11px;
+background:#eee;
+}
+img.left{margin:10px 20px 10px 0;}
+img.right{margin:10px 0 10px 20px;}
+img.cneter{margin-left:10px;}
+
 /*-----------------------------------
 Default Typography
 -----------------------------------*/
@@ -71,7 +90,7 @@ letter-spacing:-.06em;
 }
 
 h2{
-margin-top:28px;
+margin-top:22px;
 margin-bottom:-.06em;
 font-size:1.6em;
 }</diff>
      <filename>public/stylesheets/master.css</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@ class AddModelComments &lt; ActiveRecord::Migration
   def self.up
     create_table :comments do |t|
       t.column :article_id,         :integer
+      t.column :admin,              :boolean,   :default =&gt; false
       t.column :user_ip,            :string
       t.column :user_agent,         :string
       t.column :referrer,           :string
@@ -14,10 +15,10 @@ class AddModelComments &lt; ActiveRecord::Migration
       t.column :vote_count,         :integer,   :default =&gt; 1
       t.column :body,               :text
       t.column :body_html,          :text
-      t.column :created_at,         :datetime
-      t.column :updated_at,         :datetime
+      t.timestamps
     end
     add_index :comments, :article_id
+    add_index :comments, :approved
   end
 
   def self.down</diff>
      <filename>schema/migrations/002_add_model_comments.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,10 +37,10 @@ ActiveRecord::Schema.define(:version =&gt; 3) do
     t.integer  &quot;size&quot;
     t.string   &quot;attachable_type&quot;
     t.integer  &quot;attachable_id&quot;
-    t.datetime &quot;updated_at&quot;
-    t.datetime &quot;created_at&quot;
     t.string   &quot;thumbnail&quot;
     t.integer  &quot;parent_id&quot;
+    t.datetime &quot;created_at&quot;
+    t.datetime &quot;updated_at&quot;
   end
 
   add_index &quot;assets&quot;, [&quot;parent_id&quot;], :name =&gt; &quot;index_assets_on_parent_id&quot;
@@ -49,6 +49,7 @@ ActiveRecord::Schema.define(:version =&gt; 3) do
 
   create_table &quot;comments&quot;, :force =&gt; true do |t|
     t.integer  &quot;article_id&quot;
+    t.boolean  &quot;admin&quot;,      :default =&gt; false
     t.string   &quot;user_ip&quot;
     t.string   &quot;user_agent&quot;
     t.string   &quot;referrer&quot;
@@ -65,6 +66,7 @@ ActiveRecord::Schema.define(:version =&gt; 3) do
     t.datetime &quot;updated_at&quot;
   end
 
+  add_index &quot;comments&quot;, [&quot;approved&quot;], :name =&gt; &quot;index_comments_on_approved&quot;
   add_index &quot;comments&quot;, [&quot;article_id&quot;], :name =&gt; &quot;index_comments_on_article_id&quot;
 
 end</diff>
      <filename>schema/schema.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>schema/migrations/003_asset_migration.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>fc71a6418e2e10b97d579c5a3206ea17cc201652</id>
    </parent>
  </parents>
  <author>
    <name>brockwhitten</name>
    <email>brockwhitten@8b0ec7b7-bd45-0410-8a4e-3563a9e70f90</email>
  </author>
  <url>http://github.com/sintaxi/pmpknpi/commit/6eb278fa2ef46f3a827c35df3cfa38861b609bf7</url>
  <id>6eb278fa2ef46f3a827c35df3cfa38861b609bf7</id>
  <committed-date>2008-04-11T01:50:19-07:00</committed-date>
  <authored-date>2008-04-11T01:50:19-07:00</authored-date>
  <message>subversion is a being picky


git-svn-id: https://pmpknpi.googlecode.com/svn/trunk@71 8b0ec7b7-bd45-0410-8a4e-3563a9e70f90</message>
  <tree>dca994352f333d16a162b8e4447515783ad8ab7f</tree>
  <committer>
    <name>brockwhitten</name>
    <email>brockwhitten@8b0ec7b7-bd45-0410-8a4e-3563a9e70f90</email>
  </committer>
</commit>
