diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/discussions/_form.html.haml | 10 | ||||
| -rw-r--r-- | app/views/discussions/index.html.haml | 5 | ||||
| -rw-r--r-- | app/views/discussions/new.html.haml | 2 | ||||
| -rw-r--r-- | app/views/discussions/show.html.haml | 5 |
4 files changed, 22 insertions, 0 deletions
diff --git a/app/views/discussions/_form.html.haml b/app/views/discussions/_form.html.haml new file mode 100644 index 0000000..52da4a6 --- /dev/null +++ b/app/views/discussions/_form.html.haml @@ -0,0 +1,10 @@ += form_for @discussion do |f| + .entry + = f.label :recipient_tokens + = f.collection_select :recipient_tokens, User.all, :id, :name, :prompt => true, :html_options => { :multiple => true } + .entry + = f.fields_for :messages do |j| + = j.label :body + = j.text_area :body, :label => "Сообщение" + + = f.submit 'Отправить'
\ No newline at end of file diff --git a/app/views/discussions/index.html.haml b/app/views/discussions/index.html.haml new file mode 100644 index 0000000..669c01b --- /dev/null +++ b/app/views/discussions/index.html.haml @@ -0,0 +1,5 @@ +%h3 Discussions +- @discussions.each do |discussion| + = discussion.id + += 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 new file mode 100644 index 0000000..3f68ec9 --- /dev/null +++ b/app/views/discussions/new.html.haml @@ -0,0 +1,2 @@ +%h3 New discussion += render "form"
\ No newline at end of file diff --git a/app/views/discussions/show.html.haml b/app/views/discussions/show.html.haml new file mode 100644 index 0000000..8c13728 --- /dev/null +++ b/app/views/discussions/show.html.haml @@ -0,0 +1,5 @@ += @discussion.users.map { |u| u.name }.join(", ") += debug @discussion.speakers + +- @discussion.messages.each do |message| + = message.body
\ No newline at end of file |
