<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/controllers/admin/speakers_controller.rb</filename>
    </added>
    <added>
      <filename>app/views/admin/speakers/_form.html.erb</filename>
    </added>
    <added>
      <filename>app/views/admin/speakers/edit.html.erb</filename>
    </added>
    <added>
      <filename>app/views/admin/speakers/new.html.erb</filename>
    </added>
    <added>
      <filename>app/views/pages/agenda.html.erb</filename>
    </added>
    <added>
      <filename>app/views/pages/speakers.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require &quot;ostruct&quot;
 
 class PagesController &lt; ApplicationController
-  # caches_action :index, :banners, :talker
+  caches_action :index, :banners, :talker, :register, :contact, :speakers, :agenda
   
   def index
   end
@@ -36,6 +36,14 @@ class PagesController &lt; ApplicationController
   def register
   end
   
+  def speakers
+    @speakers = Speaker.all :order =&gt; &quot;name&quot;
+  end
+  
+  def agenda
+    @agenda = Agenda.all :order =&gt; &quot;start_at&quot;
+  end
+  
   private
     def contact_valid?(contact)
       contact.errors = []
@@ -82,3 +90,45 @@ class PagesController &lt; ApplicationController
     end
   
 end
+
+class Agenda
+  def self.all(*args)
+    agenda = []
+    
+    items = [
+      [&quot;08:00&quot;, &quot;08:50&quot;, &quot;Credenciamento&quot;, nil],
+      [&quot;08:50&quot;, &quot;09:00&quot;, &quot;Abertura&quot;, nil],
+      [&quot;09:00&quot;, &quot;09:40&quot;, &quot;Palestra I&quot;, 1],
+      [&quot;09:40&quot;, &quot;10:20&quot;, &quot;Palestra II&quot;, nil],
+      [&quot;10:20&quot;, &quot;10:40&quot;, &quot;Coffee-break&quot;, nil],
+      [&quot;10:40&quot;, &quot;11:20&quot;, &quot;Palestra III&quot;, nil],
+      [&quot;11:20&quot;, &quot;12:00&quot;, &quot;Palestra IV&quot;, nil],
+      [&quot;12:00&quot;, &quot;14:00&quot;, &quot;Intervalo para almo&#231;o (*)&quot;, nil],
+      [&quot;14:00&quot;, &quot;14:40&quot;, &quot;Palestra V&quot;, nil],
+      [&quot;14:40&quot;, &quot;15:20&quot;, &quot;Palestra VI&quot;, nil],
+      [&quot;15:20&quot;, &quot;15:40&quot;, &quot;Coffee-break&quot;, nil],
+      [&quot;15:40&quot;, &quot;16:20&quot;, &quot;Palestra VII&quot;, nil],
+      [&quot;16:20&quot;, &quot;17:00&quot;, &quot;Palestra VIII&quot;, nil],
+      [&quot;17:00&quot;, &quot;17:40&quot;, &quot;Palestra XI&quot;, nil],
+      [&quot;17:40&quot;, &quot;18:00&quot;, &quot;Sorteiros e encerramento&quot;, nil],
+      [&quot;18:00&quot;, &quot;Cansar&quot;, &quot;#horaextra&quot;, nil],
+    ]
+    
+    
+    items.each do |item|
+      os = OpenStruct.new :start_at =&gt; item[0], :end_at =&gt; item[1], :event =&gt; item[2], :speaker_id =&gt; item[3]
+      
+      def os.speaker
+        return nil if self.speaker_id.nil?
+        @speaker ||= Speaker.find(speaker_id) rescue nil
+      end
+      
+      def os.what_happen
+        speaker ? &quot;&lt;a href='/palestrantes#speaker-#{speaker.id}'&gt;#{speaker.name} - #{speaker.presentation}&lt;/a&gt;&quot; : self.event
+      end
+      agenda &lt;&lt; os
+    end
+    
+    agenda
+  end
+end
\ No newline at end of file</diff>
      <filename>app/controllers/pages_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,14 +9,20 @@ class UserSessionsController &lt; ApplicationController
       flash[:notice] = &quot;Seja bem vindo #{current_user.name}&quot;
       redirect_to home_url
     else
+      flash[:error] = &quot;Voc&#234; n&#227;o est&#225; tentando hackear, n&#233;?&quot;
       render :action =&gt; 'new'
     end
   end
   
   def destroy
-    @user_session = UserSession.find
-    flash[:notice] = &quot;Volte sempre #{current_user.name}.&quot;
-    @user_session.destroy
+    if current_user
+      @user_session = UserSession.find
+      flash[:notice] = &quot;Volte sempre #{current_user.name}.&quot;
+      @user_session.destroy
+    else
+      flash[:notice] = &quot;Voc&#234; nem estava logado&quot;
+    end
+    
     redirect_to home_url
   end
 end</diff>
      <filename>app/controllers/user_sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ class UsersController &lt; ApplicationController
   def create
     @user = User.new(params[:user])
     if @user.save
-      flash[:notice] = &quot;Registration successfully.&quot;
+      flash[:notice] = &quot;Seja bem vindo #{@user.name}&quot;
       redirect_to home_url
     else
       render :action =&gt; 'new'
@@ -20,7 +20,7 @@ class UsersController &lt; ApplicationController
   def update
     @user = current_user
     if @user.update_attributes(params[:user])
-      flash[:notice] = &quot;Successfully updated profile.&quot;
+      flash[:notice] = &quot;Seu dados foram atualizados&quot;
       redirect_to home_url
     else
       render :action =&gt; 'edit'</diff>
      <filename>app/controllers/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,11 @@
 &lt;div id=&quot;header&quot; class=&quot;clearfix&quot;&gt;
 	&lt;h1 class=&quot;site-name&quot;&gt;&lt;%= link_to image_tag('logo_dev.jpg', :alt =&gt; &quot;Dev in Sampa&quot;), home_path %&gt;&lt;/h1&gt;
 	&lt;%= image_tag 'banner_data.jpg', :alt =&gt; '28/11/2009 das 9:00 &#224;s 18:00', :class =&gt; 'banner-data' %&gt;
-&lt;/div&gt;
\ No newline at end of file
+
+  &lt;% if current_user %&gt;
+  &lt;div id=&quot;logged_menu&quot;&gt;
+    Ol&#225; &lt;%= current_user.name %&gt; | &lt;%= link_to &quot;Sair&quot;, logout_path %&gt;
+  &lt;/div&gt;
+  &lt;% end %&gt;
+&lt;/div&gt;
+</diff>
      <filename>app/views/layouts/_header.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,8 @@
   &lt;ul id=&quot;navigation&quot; class=&quot;clearfix&quot;&gt;
     &lt;li class=&quot;&lt;%= class_selected(&quot;pages&quot;, &quot;index&quot;) %&gt;&quot;&gt;&lt;%= link_to &quot;P&#225;gina inicial&quot;, home_path %&gt;&lt;/li&gt;
     &lt;li class=&quot;&lt;%= class_selected(&quot;pages&quot;, &quot;register&quot;) %&gt;&quot;&gt;&lt;%= link_to &quot;Inscri&#231;&#227;o&quot;, register_path %&gt;&lt;/li&gt;
-    &lt;!-- &lt;li class=&quot;&lt;%#= class_selected(&quot;speakers&quot;, &quot;index&quot;) %&gt;&quot;&gt;&lt;%#= link_to &quot;Palestrantes&quot;, speakers_path %&gt;&lt;/li&gt; --&gt;
-    &lt;li class=&quot;&lt;%= class_selected(&quot;agenda&quot;, &quot;index&quot;) %&gt;&quot;&gt;&lt;%= link_to &quot;Programa&#231;&#227;o&quot;, agenda_path %&gt;&lt;/li&gt;
+    &lt;li class=&quot;&lt;%= class_selected(&quot;pages&quot;, &quot;agenda&quot;) %&gt;&quot;&gt;&lt;%= link_to &quot;Programa&#231;&#227;o&quot;, agenda_path %&gt;&lt;/li&gt;
+    &lt;li class=&quot;&lt;%= class_selected(&quot;pages&quot;, &quot;speakers&quot;) %&gt;&quot;&gt;&lt;%= link_to &quot;Palestrantes&quot;, speakers_path %&gt;&lt;/li&gt;
     &lt;li class=&quot;&lt;%= class_selected(&quot;pages&quot;, &quot;banners&quot;) %&gt;&quot;&gt;&lt;%= link_to &quot;Divulgar&quot;, banners_path %&gt;&lt;/li&gt;
     &lt;li class=&quot;&lt;%= class_selected(&quot;pages&quot;, &quot;contact&quot;) %&gt;&quot;&gt;&lt;%= link_to &quot;Contato&quot;, contact_path %&gt;&lt;/li&gt;
   &lt;/ul&gt;</diff>
      <filename>app/views/layouts/_menu.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -3,14 +3,14 @@
 &lt;% form_for @user_session do |f| %&gt;
   &lt;%= f.error_messages %&gt;
   &lt;p&gt;
-    &lt;%= f.label :username %&gt;&lt;br /&gt;
+    &lt;%= f.label :username, &quot;Usu&#225;rio&quot; %&gt;&lt;br /&gt;
     &lt;%= f.text_field :username %&gt;
   &lt;/p&gt;
   &lt;p&gt;
-    &lt;%= f.label :password %&gt;&lt;br /&gt;
+    &lt;%= f.label :password, &quot;Senha&quot; %&gt;&lt;br /&gt;
     &lt;%= f.password_field :password %&gt;
   &lt;/p&gt;
-  &lt;p&gt;&lt;%= f.submit &quot;Submit&quot; %&gt;&lt;/p&gt;
+  &lt;p&gt;&lt;%= f.submit &quot;Confirmar&quot; %&gt;&lt;/p&gt;
 &lt;% end %&gt;
 
 &lt;%= link_to &quot;Registrar&quot;, new_user_path %&gt;
\ No newline at end of file</diff>
      <filename>app/views/user_sessions/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@ Rails::Initializer.run do |config|
   # config.gem &quot;bj&quot;
   # config.gem &quot;hpricot&quot;, :version =&gt; '0.6', :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
   # config.gem &quot;sqlite3-ruby&quot;, :lib =&gt; &quot;sqlite3&quot;
-  # config.gem &quot;aws-s3&quot;, :lib =&gt; &quot;aws/s3&quot;
+  config.gem &quot;RedCloth&quot;
 
   # Only load the plugins named here, in the order given (default is alphabetical).
   # :all can be used as a placeholder for all plugins not explicitly named</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,5 +14,4 @@ config.action_view.debug_rjs                         = true
 config.action_controller.perform_caching             = false
 
 # Don't care if the mailer can't send
-config.action_mailer.raise_delivery_errors = true#false
-
+config.action_mailer.raise_delivery_errors = false
\ No newline at end of file</diff>
      <filename>config/environments/development.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,26 @@
 ActionController::Routing::Routes.draw do |map|
-  # map.resources :user_sessions
-  # map.resources :users
-  # 
-  # map.login &quot;acesso&quot;, :controller =&gt; &quot;user_sessions&quot;, :action =&gt; &quot;new&quot;
-  # map.logout &quot;sair&quot;, :controller =&gt; &quot;user_sessions&quot;, :action =&gt; &quot;destroy&quot;
+  map.namespace :admin do |admin|
+    admin.resources :speakers
+  end
   
-  map.home &quot;/&quot;,                  :controller =&gt; &quot;pages&quot;, :action =&gt; &quot;index&quot;
-  map.agenda &quot;/programacao&quot;,    :controller =&gt; &quot;agenda&quot;,   :action =&gt; &quot;index&quot;
-  map.contact &quot;/contato&quot;,       :controller =&gt; &quot;pages&quot;,   :action =&gt; &quot;contact&quot;
+  map.resources :users, :as =&gt; &quot;usuarios&quot;
+  map.resources :user_sessions, :as =&gt; &quot;acesso&quot;
   
-  map.banners &quot;/divulgar&quot;, :controller =&gt; &quot;pages&quot;, :action =&gt; &quot;banners&quot;
+  map.with_options :controller =&gt; 'user_sessions' do |user_sessions|
+    user_sessions.login         &quot;/login&quot;,        :action =&gt; &quot;new&quot;
+    user_sessions.logout        &quot;/logout&quot;,       :action =&gt; &quot;destroy&quot;
+  end
   
-  map.wanna_talk &quot;/quero-palestrar&quot;, :controller =&gt; &quot;pages&quot;, :action =&gt; &quot;talker&quot;
+  map.with_options :controller =&gt; 'pages' do |pages|
+    pages.home       &quot;/&quot;,                :action =&gt; &quot;index&quot;
+    pages.contact    &quot;/contato&quot;,         :action =&gt; &quot;contact&quot;
+    pages.banners    &quot;/divulgar&quot;,        :action =&gt; &quot;banners&quot;
+    pages.wanna_talk &quot;/quero-palestrar&quot;, :action =&gt; &quot;talker&quot;
+    pages.register   &quot;/inscricao&quot;,       :action =&gt; &quot;register&quot;
+    pages.speakers   &quot;/palestrantes&quot;,    :action =&gt; &quot;speakers&quot;
+    pages.agenda     &quot;/programacao&quot;,     :action =&gt; &quot;agenda&quot;
+  end
   
-  map.register &quot;/inscricao&quot;, :controller =&gt; &quot;pages&quot;, :action =&gt; &quot;register&quot;
 end
 
 # The priority is based upon order of creation: first created -&gt; highest priority.</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,8 +16,6 @@ class CreateSpeakers &lt; ActiveRecord::Migration
   end
 
   def self.down
-    remove_index :speakers, :name
-    
     drop_table :speakers
   end
 end</diff>
      <filename>db/migrate/20091024145537_create_speakers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,20 +12,20 @@ $(document).ready(function() {
 		$(&quot;#map-zoom-in&quot;).toggle();
 	});
 
-	$(&quot;textarea&quot;).focus(function() {
+	$(&quot;.banner textarea, .banner-quadrado textarea&quot;).focus(function() {
 		// only select if the text has not changed
     	if(this.value == this.defaultValue) {
      		this.select();
     	}
 	});
 	
-	$(&quot;textarea&quot;).click(function() {
+	$(&quot;.banner textarea, .banner-quadrado textarea&quot;).click(function() {
 		// only select if the text has not changed
 		if(this.value == this.defaultValue) {
 			this.select();
 		}
 	});
 	
-	$(&quot;table.agenda tr:odd&quot;).addClass('odd');
+  // $(&quot;table.agenda tr:odd&quot;).addClass('odd');
 
 })
\ No newline at end of file</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,10 @@
   padding: 0;
 }
 
+h1, h2, h3, h4 {
+  clear: both;
+}
+
 body {
   color: #000;
   font-family: &quot;Lucida Grande&quot;, arial, verdana, sans-serif;
@@ -10,6 +14,10 @@ body {
   background: #fff;
 }
 
+label span {
+  color: #666;
+  font-size: .6em ;
+}
 /*****  Commons settings *****/
 fieldset { border: 0; }
 legend { display: none; }
@@ -21,6 +29,14 @@ a { text-decoration: underline; }
 .clearfix { height: 1%; }
 .clearfix:after { content: &quot;.&quot;; display: block; height: 0; clear: both; visibility: hidden; }
 
+.float-left {
+  float: left;
+}
+
+.float-right {
+  float: right;
+}
+
 #container {
   width: 980px;
   margin: 0 auto;
@@ -40,6 +56,12 @@ a { text-decoration: underline; }
   right: 0;
 }
 
+#header #logged_menu {
+  position: absolute;
+  top: 30px;
+  right: 0;
+}
+
 #menu {
   height: 70px;
   background: #666 url('/images/bg_menu.jpg') repeat-x;
@@ -70,7 +92,8 @@ ul#navigation li {
 ul#navigation li.selected {
   color: #fff;
   background: #666;
-  padding: 10px 7px;
+  padding: 0;
+  padding: 10px 0px;
 }
 
 ul#navigation li.selected a {
@@ -241,6 +264,11 @@ ul#navigation li a:hover {
 	background: #e5e5e5;
 }
 
+#content .speaker img {
+  max-width: 300px;
+  margin: 25px 15px 5px;
+}
+
 #content #warning {
   height: 70px;
   background: #FFDB70 url('/images/bg_warning.jpg') no-repeat;</diff>
      <filename>public/stylesheets/application.css</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/controllers/agenda_controller.rb</filename>
    </removed>
    <removed>
      <filename>app/views/agenda/index.html.erb</filename>
    </removed>
    <removed>
      <filename>spec/controllers/agenda_controller_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>a89a83c2be8084fa076665a44fa26a0630b3f189</id>
    </parent>
  </parents>
  <author>
    <name>tinogomes</name>
    <email>tinorj@gmail.com</email>
  </author>
  <url>http://github.com/tinogomes/devinsampa/commit/22bf4053bb75c0549dc67e17a6ae0a11ec0486d1</url>
  <id>22bf4053bb75c0549dc67e17a6ae0a11ec0486d1</id>
  <committed-date>2009-11-06T09:56:39-08:00</committed-date>
  <authored-date>2009-11-06T09:56:39-08:00</authored-date>
  <message>CRUD for speakers, list dinamically speakers, list agenda fake, cosmetic adjustiments</message>
  <tree>c004b8271d861eb7cb09c0e497e6cdbe54a4b83f</tree>
  <committer>
    <name>tinogomes</name>
    <email>tinorj@gmail.com</email>
  </committer>
</commit>
