added translations to all conversation/message views. tweaked css
This commit is contained in:
parent
84198e4750
commit
d38e3a6b29
11 changed files with 79 additions and 31 deletions
9
app/helpers/conversations_helper.rb
Normal file
9
app/helpers/conversations_helper.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
module ConversationsHelper
|
||||||
|
def new_message_text(count)
|
||||||
|
if count > 0
|
||||||
|
t('new_messages', :count => count)
|
||||||
|
else
|
||||||
|
t('no_new_messages')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -5,11 +5,10 @@
|
||||||
%li.comment{:data=>{:guid => comment.id}, :class => ("hidden" if(defined? hidden))}
|
%li.comment{:data=>{:guid => comment.id}, :class => ("hidden" if(defined? hidden))}
|
||||||
= person_image_link(comment.author)
|
= person_image_link(comment.author)
|
||||||
.content
|
.content
|
||||||
%strong
|
.from
|
||||||
= person_link(comment.author)
|
= person_link(comment.author)
|
||||||
|
%time.timeago{:datetime => comment.created_at}
|
||||||
= markdownify(comment.text, :youtube_maps => comment.youtube_titles)
|
|
||||||
|
|
||||||
.info
|
|
||||||
%span.time
|
|
||||||
= comment.created_at ? timeago(comment.created_at) : timeago(Time.now)
|
= comment.created_at ? timeago(comment.created_at) : timeago(Time.now)
|
||||||
|
|
||||||
|
%p
|
||||||
|
= markdownify(comment.text, :youtube_maps => comment.youtube_titles)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
.last_author
|
.last_author
|
||||||
.timestamp
|
.timestamp
|
||||||
= time_ago_in_words conversation.updated_at
|
= time_ago_in_words(conversation.updated_at)
|
||||||
= authors[conversation.id].name
|
= authors[conversation.id].name
|
||||||
|
|
||||||
- if conversation.participants.size > 2
|
- if conversation.participants.size > 2
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
= conversation.subject
|
= conversation.subject
|
||||||
|
|
||||||
.conversation_controls
|
.conversation_controls
|
||||||
= link_to (image_tag('reply.png', :height => 14, :width => 14) + ' ' + 'reply'), '#', :id => 'reply_to_conversation'
|
= link_to (image_tag('reply.png', :height => 14, :width => 14) + ' ' + t('.reply')), '#', :id => 'reply_to_conversation'
|
||||||
= link_to (image_tag('deletelabel.png') + ' ' + t('delete').downcase), conversation_conversation_visibility_path(conversation), :method => 'delete', :confirm => t('are_you_sure')
|
= link_to (image_tag('deletelabel.png') + ' ' + t('delete').downcase), conversation_conversation_visibility_path(conversation), :method => 'delete', :confirm => t('are_you_sure')
|
||||||
|
|
||||||
.span-6.avatars.last
|
.span-6.avatars.last
|
||||||
|
|
@ -33,5 +33,5 @@
|
||||||
= form_for [conversation, Message.new] do |message|
|
= form_for [conversation, Message.new] do |message|
|
||||||
= message.text_area :text, :rows => 5
|
= message.text_area :text, :rows => 5
|
||||||
.right
|
.right
|
||||||
= message.submit 'Reply', :class => 'button'
|
= message.submit t('.reply').capitalize, :class => 'button'
|
||||||
= link_to 'Cancel', '#'
|
= link_to t('cancel'), '#'
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
= include_javascripts :inbox
|
= include_javascripts :inbox
|
||||||
|
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
Message Inbox
|
= t('.message_inbox')
|
||||||
|
|
||||||
:css
|
:css
|
||||||
footer{ display:none;}
|
footer{ display:none;}
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
#left_pane_header
|
#left_pane_header
|
||||||
%h3
|
%h3
|
||||||
.right
|
.right
|
||||||
= link_to 'New Message', new_conversation_path, :class => 'button', :rel => 'facebox'
|
= link_to t('.new_message'), new_conversation_path, :class => 'button', :rel => 'facebox'
|
||||||
Inbox
|
Inbox
|
||||||
|
|
||||||
#conversation_inbox
|
#conversation_inbox
|
||||||
|
|
@ -26,13 +26,13 @@
|
||||||
= will_paginate @conversations
|
= will_paginate @conversations
|
||||||
- else
|
- else
|
||||||
%i
|
%i
|
||||||
You have no messages
|
= t('.you_have_no_new_messages')
|
||||||
|
|
||||||
#conversation_show.span-16.prepend-8.last
|
#conversation_show.span-16.prepend-8.last
|
||||||
- if @conversation
|
- if @conversation
|
||||||
= render 'conversations/show', :conversation => @conversation
|
= render 'conversations/show', :conversation => @conversation
|
||||||
- else
|
- else
|
||||||
#no_conversation_text
|
#no_conversation_text
|
||||||
no conversation selected
|
= t('.no_conversation_selected')
|
||||||
#no_conversation_controls
|
#no_conversation_controls
|
||||||
= link_to 'create a new message', new_conversation_path, :rel => 'facebox'
|
= link_to t('.create_a_new_message'), new_conversation_path, :rel => 'facebox'
|
||||||
|
|
|
||||||
|
|
@ -26,20 +26,20 @@
|
||||||
.span-12.last
|
.span-12.last
|
||||||
#facebox_header
|
#facebox_header
|
||||||
%h4
|
%h4
|
||||||
New Message
|
= t('conversations.index.new_message')
|
||||||
|
|
||||||
= form_for Conversation.new do |conversation|
|
= form_for Conversation.new do |conversation|
|
||||||
%br
|
%br
|
||||||
|
|
||||||
.span-2
|
.span-2
|
||||||
%h4
|
%h4
|
||||||
to
|
= t('.to')
|
||||||
.span-10.last
|
.span-10.last
|
||||||
= text_field_tag "contact_autocomplete"
|
= text_field_tag "contact_autocomplete"
|
||||||
|
|
||||||
.span-2
|
.span-2
|
||||||
%h4
|
%h4
|
||||||
subject
|
= t('.subject')
|
||||||
.span-10.last
|
.span-10.last
|
||||||
= conversation.text_field :subject
|
= conversation.text_field :subject
|
||||||
|
|
||||||
|
|
@ -47,5 +47,5 @@
|
||||||
= text_area_tag "conversation[text]", '', :rows => 5
|
= text_area_tag "conversation[text]", '', :rows => 5
|
||||||
|
|
||||||
.text-right
|
.text-right
|
||||||
= conversation.submit :send, :class => 'button'
|
= conversation.submit t('.send'), :class => 'button'
|
||||||
= link_to 'cancel', conversations_path
|
= link_to t('cancel'), conversations_path
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,12 @@
|
||||||
- if @notification_count
|
- if @notification_count
|
||||||
#notification_badge
|
#notification_badge
|
||||||
= link_to "", notifications_path, :title => new_notification_text(@notification_count)
|
= link_to "", notifications_path, :title => new_notification_text(@notification_count)
|
||||||
= image_tag 'icons/mail_grey.png'
|
= image_tag 'icons/monotone_flag.png', :height => 20, :width => 20
|
||||||
.badge_count{:class => ("hidden" if @notification_count == 0)}
|
.badge_count{:class => ("hidden" if @notification_count == 0)}
|
||||||
= @notification_count
|
= @notification_count
|
||||||
#message_inbox_badge
|
#message_inbox_badge
|
||||||
= link_to "", conversations_path #, :title => new_notification_text(@notification_count)
|
= link_to "", conversations_path , :title => new_message_text(@unread_message_count)
|
||||||
= image_tag 'icons/mail_grey.png'
|
= image_tag 'icons/mail_grey.png', :height => 16, :width => 16
|
||||||
.badge_count{:class => ("hidden" if @unread_message_count == 0)}
|
.badge_count{:class => ("hidden" if @unread_message_count == 0)}
|
||||||
= @unread_message_count
|
= @unread_message_count
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
.from
|
.from
|
||||||
= person_link(post.author, :class => 'author')
|
= person_link(post.author, :class => 'author')
|
||||||
%time.timeago{:datetime => post.created_at}
|
%time.timeago{:datetime => post.created_at}
|
||||||
= link_to(how_long_ago(post), status_message_path(post))
|
|
||||||
%p
|
%p
|
||||||
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
||||||
|
|
||||||
|
|
@ -29,6 +28,9 @@
|
||||||
%span.aspect_badges
|
%span.aspect_badges
|
||||||
= aspect_badges(aspects_with_post(all_aspects, post))
|
= aspect_badges(aspects_with_post(all_aspects, post))
|
||||||
|
|
||||||
|
%span.timeago
|
||||||
|
= link_to(how_long_ago(post), status_message_path(post))
|
||||||
|
|
||||||
= link_to t('comments.new_comment.comment').downcase, '#', :class => 'focus_comment_textarea'
|
= link_to t('comments.new_comment.comment').downcase, '#', :class => 'focus_comment_textarea'
|
||||||
|
|
||||||
= render "comments/comments", :post_id => post.id, :comments => post.comments, :current_user => current_user, :condensed => true, :commenting_disabled => defined?(@commenting_disabled)
|
= render "comments/comments", :post_id => post.id, :comments => post.comments, :current_user => current_user, :condensed => true, :commenting_disabled => defined?(@commenting_disabled)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ en:
|
||||||
search: "Search"
|
search: "Search"
|
||||||
new_notifications: "%{count} new notifications"
|
new_notifications: "%{count} new notifications"
|
||||||
no_new_notifications: "no new notifications"
|
no_new_notifications: "no new notifications"
|
||||||
|
new_messages: "%{count} new messages"
|
||||||
|
no_new_messages: "no new messages"
|
||||||
_home: "Home"
|
_home: "Home"
|
||||||
_more: "More"
|
_more: "More"
|
||||||
_comments: "Comments"
|
_comments: "Comments"
|
||||||
|
|
@ -523,3 +525,16 @@ en:
|
||||||
fullmonth_day: "%B %d"
|
fullmonth_day: "%B %d"
|
||||||
birthday: "%B %d"
|
birthday: "%B %d"
|
||||||
birthday_with_year: "%B %d %Y"
|
birthday_with_year: "%B %d %Y"
|
||||||
|
|
||||||
|
conversations:
|
||||||
|
index:
|
||||||
|
message_inbox: "Message Inbox"
|
||||||
|
new_message: "New Message"
|
||||||
|
no_conversation_selected: "no conversation selected"
|
||||||
|
create_a_new_message: "create a new message"
|
||||||
|
show:
|
||||||
|
reply: 'reply'
|
||||||
|
new:
|
||||||
|
to: 'to'
|
||||||
|
subject: 'subject'
|
||||||
|
send: 'Send'
|
||||||
|
|
|
||||||
BIN
public/images/icons/monotone_flag.png
Normal file
BIN
public/images/icons/monotone_flag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 783 B |
|
|
@ -254,6 +254,7 @@ header
|
||||||
.stream
|
.stream
|
||||||
.stream_element
|
.stream_element
|
||||||
:padding 20px 20px
|
:padding 20px 20px
|
||||||
|
:right 70px
|
||||||
:min-height 50px
|
:min-height 50px
|
||||||
:border
|
:border
|
||||||
:bottom 1px solid #ddd
|
:bottom 1px solid #ddd
|
||||||
|
|
@ -262,6 +263,9 @@ header
|
||||||
&:hover
|
&:hover
|
||||||
.right
|
.right
|
||||||
:display inline
|
:display inline
|
||||||
|
.from
|
||||||
|
a
|
||||||
|
:color $blue
|
||||||
|
|
||||||
.youtube-player, .vimeo-player
|
.youtube-player, .vimeo-player
|
||||||
:border none
|
:border none
|
||||||
|
|
@ -393,7 +397,7 @@ header
|
||||||
:margin
|
:margin
|
||||||
:top 2px
|
:top 2px
|
||||||
:color #999
|
:color #999
|
||||||
:font-size smaller
|
:font-size 11px
|
||||||
|
|
||||||
.comments
|
.comments
|
||||||
.info
|
.info
|
||||||
|
|
@ -410,7 +414,7 @@ header
|
||||||
|
|
||||||
.time,
|
.time,
|
||||||
.timeago
|
.timeago
|
||||||
:color #ccc
|
:color #999
|
||||||
a
|
a
|
||||||
:color #ccc
|
:color #ccc
|
||||||
:margin
|
:margin
|
||||||
|
|
@ -559,6 +563,8 @@ ul.show_comments
|
||||||
:line
|
:line
|
||||||
:height 18px
|
:height 18px
|
||||||
|
|
||||||
|
:position relative
|
||||||
|
|
||||||
textarea
|
textarea
|
||||||
:width 100%
|
:width 100%
|
||||||
:height 1.4em
|
:height 1.4em
|
||||||
|
|
@ -593,9 +599,6 @@ ul.show_comments
|
||||||
a
|
a
|
||||||
:color #444
|
:color #444
|
||||||
|
|
||||||
div.time
|
|
||||||
:color #bbb
|
|
||||||
|
|
||||||
form
|
form
|
||||||
:margin
|
:margin
|
||||||
:top -5px
|
:top -5px
|
||||||
|
|
@ -634,6 +637,12 @@ ul.show_comments
|
||||||
textarea
|
textarea
|
||||||
:min-height 2.4em
|
:min-height 2.4em
|
||||||
|
|
||||||
|
.comments
|
||||||
|
time
|
||||||
|
:margin
|
||||||
|
:right -15px
|
||||||
|
.timeago
|
||||||
|
:color #999
|
||||||
|
|
||||||
.stream.show
|
.stream.show
|
||||||
ul.comments
|
ul.comments
|
||||||
|
|
@ -693,11 +702,14 @@ a.paginate, #infscr-loading
|
||||||
:right 12px
|
:right 12px
|
||||||
|
|
||||||
&.controls
|
&.controls
|
||||||
|
:z-index 6
|
||||||
:background
|
:background
|
||||||
:color $background
|
:color $background
|
||||||
:font
|
:font
|
||||||
:size 12px
|
:size 12px
|
||||||
:color #999
|
:color #999
|
||||||
|
:padding
|
||||||
|
:left 100px
|
||||||
a
|
a
|
||||||
:color #999
|
:color #999
|
||||||
:font
|
:font
|
||||||
|
|
@ -1672,11 +1684,11 @@ h3 span.current_gs_step
|
||||||
:top 5px
|
:top 5px
|
||||||
:display inline
|
:display inline
|
||||||
:margin 0 10px
|
:margin 0 10px
|
||||||
:right 0
|
:right -5px
|
||||||
:font
|
:font
|
||||||
:weight bold
|
:weight bold
|
||||||
:size smaller
|
:size smaller
|
||||||
:width 30px
|
:width 28px
|
||||||
|
|
||||||
a
|
a
|
||||||
:z-index 5
|
:z-index 5
|
||||||
|
|
@ -1685,6 +1697,16 @@ h3 span.current_gs_step
|
||||||
:width 20px
|
:width 20px
|
||||||
:height 20px
|
:height 20px
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
.badge_count
|
||||||
|
:background
|
||||||
|
:color lighten(#A40802, 5%)
|
||||||
|
|
||||||
|
#notification_badge
|
||||||
|
img
|
||||||
|
:position relative
|
||||||
|
:top 2px
|
||||||
|
|
||||||
.badge_count
|
.badge_count
|
||||||
:z-index 3
|
:z-index 3
|
||||||
:position absolute
|
:position absolute
|
||||||
|
|
@ -2275,6 +2297,7 @@ ul.show_comments
|
||||||
:margin
|
:margin
|
||||||
:left 0.5em
|
:left 0.5em
|
||||||
:right 0.5em
|
:right 0.5em
|
||||||
|
|
||||||
.mark_all_read
|
.mark_all_read
|
||||||
:position relative
|
:position relative
|
||||||
:top 10px
|
:top 10px
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue