From 932790890a583cf877ef06a218316b82a7014b60 Mon Sep 17 00:00:00 2001 From: dima Date: Sat, 10 Dec 2011 17:21:59 +0100 Subject: fix readme and remove whitespacetrailing --- app/views/inboxes/discussions/_form.html.haml | 2 +- app/views/inboxes/discussions/index.html.haml | 2 +- app/views/inboxes/discussions/show.html.haml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/inboxes/discussions/_form.html.haml b/app/views/inboxes/discussions/_form.html.haml index 303f0bb..800004b 100644 --- a/app/views/inboxes/discussions/_form.html.haml +++ b/app/views/inboxes/discussions/_form.html.haml @@ -8,5 +8,5 @@ = j.label :body %br = j.text_area :body - + %p= f.submit \ No newline at end of file diff --git a/app/views/inboxes/discussions/index.html.haml b/app/views/inboxes/discussions/index.html.haml index 86ae297..7e300d4 100644 --- a/app/views/inboxes/discussions/index.html.haml +++ b/app/views/inboxes/discussions/index.html.haml @@ -12,6 +12,6 @@ = 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/inboxes/discussions/show.html.haml b/app/views/inboxes/discussions/show.html.haml index a910b51..50f5d19 100644 --- a/app/views/inboxes/discussions/show.html.haml +++ b/app/views/inboxes/discussions/show.html.haml @@ -16,13 +16,13 @@ = f.label :user_id, "Add speaker" = f.collection_select :user_id, available_users, :id, :name = f.submit "Add" - - + + %h3 Messages #messages_box = render @discussion.messages, :as => :message - + %h3 Add message = render "inboxes/messages/form" -- cgit v1.2.3 From c94547a6bab514e6df816e105f17311ba2ce73c9 Mon Sep 17 00:00:00 2001 From: dima Date: Sun, 11 Dec 2011 11:14:09 +0100 Subject: выводим количество непрочитанных сообщений в дискуссии --- app/views/inboxes/discussions/index.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/inboxes/discussions/index.html.haml b/app/views/inboxes/discussions/index.html.haml index 7e300d4..3d47a59 100644 --- a/app/views/inboxes/discussions/index.html.haml +++ b/app/views/inboxes/discussions/index.html.haml @@ -11,7 +11,7 @@ %td = link_to discussion.users.collect{|u| u[Inboxes::config.user_name]}.join(', '), discussion %td - = discussion.unread_for?(current_user) ? "Yes" : "No" + = discussion.unread_for?(current_user) ? (discussion.count_unread_mess(current_user).to_s + ' сообщение') : "No" %p - = link_to "Create new", new_discussion_path \ No newline at end of file + = link_to "Create new", new_discussion_path -- cgit v1.2.3