Permalink
Browse files

new campfire chat nav item and updated home page

  • Loading branch information...
1 parent f95c8aa commit 22577a37dc9c55aca9a4352429b3e4f533217834 @ehutzelman committed Sep 9, 2010
Showing with 84 additions and 77 deletions.
  1. +4 −1 app/models/topic.rb
  2. +38 −37 app/views/layouts/application.html.erb
  3. +14 −11 app/views/pages/index.html.erb
  4. +1 −1 app/views/topics/_topic.html.erb
  5. +27 −27 db/schema.rb
View
@@ -7,5 +7,8 @@ class Topic < ActiveRecord::Base
validates_presence_of :description, :requester_user_id
default_scope :conditions => {:is_active => true}, :order => 'topic_votes_count DESC'
-
+
+ def has_user_vote(user)
+ topic_votes.find_by_user_id(user)
+ end
end
@@ -8,60 +8,61 @@
<meta name="description" content="Houston area ruby and rails user group" />
<meta name="robots" content="all" />
<%= stylesheet_link_tag 'screen', 'formtastic', 'formtastic_changes' %>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
- <%= javascript_include_tag 'application', :cache => true %>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <%= javascript_include_tag 'application', :cache => true %>
</head>
<body id="<%= @body_id || controller.controller_name %>">
<div id="logo">
- <h1>houston<span style="color:#EC0000">rb</span>.com</h1>
- <h2>Houston area <span style="color:#EC0000">Ruby and Rails</span> user group</h2>
+ <h1>houston<span style="color:#EC0000">rb</span>.com</h1>
+ <h2>Houston area <span style="color:#EC0000">Ruby and Rails</span> user group</h2>
</div>
<div id="menu">
- <ul>
- <li id="aboutNav"><%= link_to 'about us', root_path %></li>
- <li id="usersNav"><%= link_to 'members', users_path %></li>
- <li id="meetingsNav"><%= link_to 'meetings', meetings_path %></li>
- <li id="topicsNav"><%= link_to 'topics', topics_path %></li>
- <li id="postsNav"><%= link_to 'discussion', posts_path %></li>
- <li id="booksNav"><%= link_to 'library', books_path %></li>
- <li id="profileNav"><%= link_to 'my profile', (current_user ? edit_user_path(current_user) : login_path) %>
- </li>
- </ul>
- <hr />
+ <ul>
+ <li id="aboutNav"><%= link_to 'about us', root_path %></li>
+ <li id="usersNav"><%= link_to 'members', users_path %></li>
+ <!-- <li id="meetingsNav"><%= link_to 'meetings', meetings_path %></li> -->
+ <li id="chatNav"><%= link_to 'campfire', 'http://zipzoomauto.campfirenow.com/1c8f5' %></li>
+ <li id="topicsNav"><%= link_to 'topics', topics_path %></li>
+ <li id="postsNav"><%= link_to 'discussion', posts_path %></li>
+ <li id="booksNav"><%= link_to 'library', books_path %></li>
+ <li id="profileNav"><%= link_to 'my profile', (current_user ? edit_user_path(current_user) : login_path) %>
+ </li>
+ </ul>
+ <hr />
</div>
<div id="bg">
- <div id="page">
- <div id="content">
+ <div id="page">
+ <div id="content">
<%- flash.each do |name, msg| -%>
<%= content_tag(:div, msg, :id => "flash_#{name}") if %w(notice error).include?(name.to_s) %>
<%- end -%>
- <div class="post">
- <h1 class="title"><%= @page_title %></h1>
- <div class="entry">
- <%= yield %>
- </div>
- </div>
- </div>
- <!-- end #content -->
-
- <div id="sidebar">
- <%= yield(:sidebar) || render(:partial => "layouts/sidebar") %>
- </div>
- <!-- end #sidebar -->
-
- <div style="clear: both; height: 20px;">&nbsp;</div>
- </div>
- <!-- end #page -->
+ <div class="post">
+ <h1 class="title"><%= @page_title %></h1>
+ <div class="entry">
+ <%= yield %>
+ </div>
+ </div>
+ </div>
+ <!-- end #content -->
+
+ <div id="sidebar">
+ <%= yield(:sidebar) || render(:partial => "layouts/sidebar") %>
+ </div>
+ <!-- end #sidebar -->
+
+ <div style="clear: both; height: 20px;">&nbsp;</div>
+ </div>
+ <!-- end #page -->
</div>
<!-- end #bg -->
<div id="footer">
- <hr />
- <p> Site created by <%= link_to 'Hutzelman', "http://www.hutzelman.com" %>. Design by <a href="http://www.nodethirtythree.com/">NodeThirtyThree</a> for <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
+ <hr />
+ <p> Site created by <%= link_to 'Hutzelman', "http://www.hutzelman.com" %>. Design by <a href="http://www.nodethirtythree.com/">NodeThirtyThree</a> for <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
<script type="text/javascript">
@@ -74,7 +75,7 @@
pageTracker._trackPageview();
} catch(err) {}
</script>
-
+
</body>
</html>
@@ -1,23 +1,26 @@
<% title "houston ruby and rails group", "about" %>
<p>
- The popularity of the <a href="http://www.ruby-lang.org">Ruby programming language</a>
- is growing at a rapid pace, along with that of the
- <a href="http://www.rubyonrails.org">Ruby on Rails</a> web application framework.
- The <strong>Houston Ruby Group</strong> is for those that are interested in programming in Ruby and
- the Ruby on Rails framework.
- If you would like to interact with other Ruby developers in the Houston area, join us with your questions and your expertise. It does not matter whether you are just starting or whether you are a seasoned pro - all are welcome.
+ The popularity of the <a href="http://www.ruby-lang.org">Ruby programming language</a>
+ is growing at a rapid pace, along with that of the
+ <a href="http://www.rubyonrails.org">Ruby on Rails</a> web application framework.
+ The <strong>Houston Ruby Group</strong> is for those that are interested in programming in Ruby and
+ the Ruby on Rails framework.
+ If you would like to interact with other Ruby developers in the Houston area, join us with your questions and your expertise. It does not matter whether you are just starting or whether you are a seasoned pro - all are welcome.
</p>
<h2 class="title">what do we do?</h2>
<p>
- We generally meet the 2nd Tuesday of each month in the evening to talk about Ruby and Rails. The
- meetings usually consist of a presentation by a member or guest followed by discussion.
- If you can't make it to the meetings, please feel free to join the <%= link_to 'discussion group', posts_path %> and participate.
+ We generally meet the 2nd Tuesday of each month in the evening to talk about Ruby and Rails. The
+ meetings usually consist of a presentation by a member or guest followed by discussion.
+ If you can't make it to the meetings, please feel free to join the <%= link_to 'discussion group', posts_path %> and participate.
+</p>
+<p>We now have a <a href="http://zipzoomauto.campfirenow.com/1c8f5">Houston.rb campfire chat room</a>. Please feel free to drop in
+ if you are coworking or just want to chat with other Houston rubyists.
</p>
<h2 class="title">how do you join?</h2>
<p>
- Show up! The information for the next meeting is shown on this page. You
- can also <%= link_to 'create a profile', login_path %> on this site so other members can get to know you.
+ Show up! The information for the next meeting is shown on this page. You
+ can also <%= link_to 'create a profile', login_path %> on this site so other members can get to know you.
</p>
@@ -6,7 +6,7 @@
<div class="label">votes</div>
</div>
<span style="font-size:.9em">
- <% if current_user && !topic.topic_votes.find_by_user_id(current_user) %>
+ <% if current_user && !topic.has_user_vote(current_user) %>
<%= link_to('vote', vote_topic_path(topic), :method => :post) %>
<% else %>
&nbsp;
View
@@ -12,25 +12,25 @@
ActiveRecord::Schema.define(:version => 20100501221601) do
create_table "books", :force => true do |t|
- t.string "asin"
- t.string "title"
- t.string "authors"
- t.string "url"
- t.string "image_url"
- t.datetime "published_at"
- t.boolean "available"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.string "asin"
+ t.string "title"
+ t.string "authors"
+ t.string "url"
+ t.string "image_url"
+ t.timestamp "published_at"
+ t.boolean "available"
+ t.timestamp "created_at"
+ t.timestamp "updated_at"
end
create_table "meetings", :force => true do |t|
- t.string "title"
- t.string "description"
- t.string "location"
- t.datetime "start_at"
- t.datetime "end_at"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.string "title"
+ t.string "description"
+ t.string "location"
+ t.timestamp "start_at"
+ t.timestamp "end_at"
+ t.timestamp "created_at"
+ t.timestamp "updated_at"
end
create_table "open_id_authentication_associations", :force => true do |t|
@@ -66,17 +66,17 @@
end
create_table "users", :force => true do |t|
- t.string "identity_url"
- t.string "name"
- t.string "email"
- t.text "bio"
- t.string "url"
- t.string "twitter"
- t.boolean "display"
- t.boolean "available"
- t.datetime "last_login_at"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.string "identity_url"
+ t.string "name"
+ t.string "email"
+ t.text "bio"
+ t.string "url"
+ t.string "twitter"
+ t.boolean "display"
+ t.boolean "available"
+ t.timestamp "last_login_at"
+ t.timestamp "created_at"
+ t.timestamp "updated_at"
end
end

0 comments on commit 22577a3

Please sign in to comment.