public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Michael Hartl (author)
Thu May 08 12:36:21 -0700 2008
commit  81389f1c0a1dc1874f2f5c885fb43efa97233e60
tree    226e293aaccd6e1ecf915f90f1a9bc710c853bfc
parent  0177c8084c6d7da1cec4ecaf6f116c1865caae35
insoshi / app / views / messages / new.html.erb
100644 47 lines (41 sloc) 1.586 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<h2>New message</h2>
 
<%- column_div :type => :primary do -%>
 
  <p><%= formatting_note %></p>
 
  <%= error_messages_for :message %>
  
  <%= image_link @recipient, :image => :thumbnail %>
 
  <% form_for(:message,
              :url => person_messages_path(@recipient)) do |f| %>
    <div class="form_row full">
      <label for="message_to">To</label>
      <%= text_field_tag :recipient, h(@recipient.name) %>
      <!-- TODO: be able to change recipients with this
<a href="#" class="add-recipient">
<%= image_tag "icons/add.gif", :alt => "Add a recipient" %>
</a> -->
    </div>
    <div class="form_row full">
      <label for="message_subject">Subject</label>
      <%= f.text_field :subject, :id => "message_subject" %>
    </div>
    <div class="form_row">
      <label for="message_body">Your message</label>
      <%= f.text_area :content, :id => "message_body" %>
      <%- if @message.reply? -%>
        <%= f.hidden_field :parent_id %>
        <%= set_focus_to_id "message_body" %>
      <%- else -%>
        <%= set_focus_to_id "message_subject" %>
      <%- end -%>
    </div>
    <div class="form_row">
      <%= f.submit "Send!", :class => "button", :id => "message_submit" %>
      <%= f.submit "Cancel", :class => "button", :id => "cancel" %>
      <%- if current_person?(@recipient) and current_person.admin? -%>
        <%= f.submit "Send to all", :class => "button", :id => "all_people" %>
      <%- end -%>
    </div>
  <% end %>
<%- end -%>
 
<%- column_div :type => :secondary do -%>
  <%= render :partial => 'shared/minifeed' %>
<%- end -%>