Skip to content
Browse files

heaps more shit

  • Loading branch information...
1 parent 8f5d014 commit df93c39c3182013c8c825713169e871d3c97ada7 @bjeanes committed Oct 22, 2008
View
11 app/helpers/messages_helper.rb
@@ -0,0 +1,11 @@
+module MessagesHelper
+ def user(sender)
+ "<span class=\"user\" style=\"color:##{sender.colour}\">
+ #{sender}
+ </span>"
+ end
+
+ def timestamp(time = Time.now)
+ "[#{time.strftime("%d %b %y @ %H:%M")}]"
+ end
+end
View
4 app/views/messages/_gained_a_life.html.erb
@@ -0,0 +1,4 @@
+<div class="message status">
+ <%= timestamp %>
+ <%= user user_1 %> has gained a life from <%= user user_2 %>
+</div>
View
25 app/views/shared/_chat.html.erb
@@ -0,0 +1,25 @@
+<div id="chat">
+ <div id="messages">
+ <div class="history">
+ <%= render :partial => 'messages/message', :collection => @messages %>
+ <div class="marker">
+ &#x21E7; HISTORY &#x21E7;
+ </div>
+ </div>
+ </div>
+ <div id="text_input">
+ <form method="post" action="<%= messages_path %>" id="send_message_form">
+ <%= text_field_tag 'message[content]', '',
+ { :id => 'message_content',
+ :disabled => true} %>
+ <%= hidden_field_tag 'message[kind]', 'channel', {:id => 'message_kind'}%>
+ <%= hidden_field_tag 'message[channel_id]', channel, { :id => 'message_channel' } %>
+ <%#= hidden_field_tag 'authenticity_token', form_authenticity_token %>
+ <%= submit_tag "Send", {:id => "message_send", :disabled => true} %>
+ </form>
+
+ <div id="chat_status">
+ Disconnected.
+ </div>
+ </div>
+</div>
2 vendor/plugins/juggernaut
@@ -1 +1 @@
-Subproject commit 3b686e839880d3a83d2c7a2700b30aaeaa681cd7
+Subproject commit 856649f959d3cdf7f32c80fedde9e8a57ef7b026

0 comments on commit df93c39

Please sign in to comment.
Something went wrong with that request. Please try again.