aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/discussions
diff options
context:
space:
mode:
authorKir2011-11-16 14:41:29 +0400
committerKir2011-11-16 14:41:29 +0400
commit661590c630f022fc678c4d5664b497db13de6eec (patch)
tree0c434d3e4560b6cb13c7184c31472dd824b5bbe5 /app/views/discussions
parent61bd4dd67fdaee93af6994d539b86d46cd1c45f1 (diff)
downloadinboxes-661590c630f022fc678c4d5664b497db13de6eec.tar.bz2
Faye integration, resources under modulev0.0.1
Diffstat (limited to 'app/views/discussions')
-rw-r--r--app/views/discussions/_form.html.haml12
-rw-r--r--app/views/discussions/index.html.haml18
-rw-r--r--app/views/discussions/new.html.haml5
-rw-r--r--app/views/discussions/show.html.haml39
4 files changed, 0 insertions, 74 deletions
diff --git a/app/views/discussions/_form.html.haml b/app/views/discussions/_form.html.haml
deleted file mode 100644
index 303f0bb..0000000
--- a/app/views/discussions/_form.html.haml
+++ /dev/null
@@ -1,12 +0,0 @@
-= form_for @discussion do |f|
- %p
- = f.label :recipient_tokens
- %br
- = select_tag "discussion[recipient_tokens]", options_from_collection_for_select(User.all, :id, Inboxes::config.user_name), :multiple => true, :size => "4"
- %p
- = f.fields_for :messages do |j|
- = j.label :body
- %br
- = j.text_area :body
-
- %p= f.submit \ No newline at end of file
diff --git a/app/views/discussions/index.html.haml b/app/views/discussions/index.html.haml
deleted file mode 100644
index 8060254..0000000
--- a/app/views/discussions/index.html.haml
+++ /dev/null
@@ -1,18 +0,0 @@
-%h1 Discussions list
-
-%table
- %tr
- %th Last message
- %th Members
- %th Unread
- - @discussions.each do |discussion|
- %tr
- %td
- = discussion.updated_at
- %td
- = link_to discussion.users.collect{|u| u[Inboxes::config.user_name]}.join(', '), discussion
- %td
- = discussion.unread_for?(current_user) ? "Yes" : "No"
-
-%p
- = link_to "Create new", new_discussion_path \ No newline at end of file
diff --git a/app/views/discussions/new.html.haml b/app/views/discussions/new.html.haml
deleted file mode 100644
index 6bcf481..0000000
--- a/app/views/discussions/new.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%h1 New discussion
-
-= render "form"
-
-%p= link_to "All discussions", discussions_path \ No newline at end of file
diff --git a/app/views/discussions/show.html.haml b/app/views/discussions/show.html.haml
deleted file mode 100644
index e25d0a2..0000000
--- a/app/views/discussions/show.html.haml
+++ /dev/null
@@ -1,39 +0,0 @@
-%h1 Discussion
-
-%h3
- Members
-- @discussion.speakers.each do |speaker|
- %div
- = speaker.user[Inboxes::config.user_name]
- = link_to '(remove)', discussion_speaker_path(@discussion, speaker), :method => :delete
-
-- available_users = User.all.map { |u| u unless @discussion.users.include?(u) }.delete_if { |w| w.nil? }
-- if available_users.any?
- = form_for Speaker.new, :url => discussion_speakers_path(@discussion) do |f|
- = f.label :user_id, "Add speaker"
- = f.collection_select :user_id, available_users, :id, :name
- = f.submit "Add"
-
-
-%h3 Messages
-
-%table
- %tr
- %th User
- %th Message
- %th Posted at
- - @discussion.messages.each do |message|
- %tr
- %td
- = message.user[Inboxes::config.user_name]
- %td
- = message.body
- %td
- = l(message.created_at)
-
-%h3 Add message
-= render "messages/form"
-
-%p
- = link_to "Leave discussion", discussion_speaker_path(@discussion, @discussion.find_speaker_by_user(current_user)), :method => :delete unless @discussion.private?
- = link_to "All discussions", discussions_path \ No newline at end of file