social_stream-base 0.6.8 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/app/assets/images/btn/activity.png +0 -0
- data/app/assets/images/btn/post.png +0 -0
- data/app/assets/images/icons/favicon.ico +0 -0
- data/app/{views/activities/_jquery.html.erb → assets/javascripts/activities.js.erb} +24 -15
- data/app/assets/javascripts/ckeditor.rails.js.erb +4 -0
- data/app/assets/javascripts/contacts.js +10 -0
- data/app/assets/javascripts/conversations.js +3 -0
- data/app/assets/javascripts/groups.js +5 -0
- data/app/assets/javascripts/invitations.js +1 -0
- data/app/assets/javascripts/{main.js → layouts.js} +4 -11
- data/app/assets/javascripts/messages.js +3 -0
- data/app/assets/javascripts/profiles.js +6 -0
- data/app/{views/relation/customs/_jquery.erb → assets/javascripts/relation_customs.js} +12 -2
- data/app/assets/javascripts/settings.js +1 -1
- data/app/assets/javascripts/social_stream-base.js +6 -0
- data/app/assets/javascripts/toolbar.js +1 -0
- data/app/assets/javascripts/users.js +2 -0
- data/app/assets/stylesheets/base.css +18 -2
- data/app/controllers/contacts_controller.rb +18 -10
- data/app/helpers/notifications_helper.rb +13 -5
- data/app/models/activity.rb +14 -15
- data/app/models/actor.rb +7 -1
- data/app/models/relation.rb +1 -1
- data/app/models/tie.rb +1 -1
- data/app/views/activities/_index.html.erb +3 -9
- data/app/views/activities/_new.html.erb +8 -0
- data/app/views/contacts/_form.html.erb +0 -15
- data/app/views/contacts/_index.html.erb +7 -4
- data/app/views/contacts/index.html.erb +0 -4
- data/app/views/conversations/show.html.erb +0 -1
- data/app/views/conversations/show.js.erb +1 -3
- data/app/views/groups/_new.html.erb +0 -1
- data/app/views/groups/_sidebar_index.html.erb +0 -2
- data/app/views/groups/index.html.erb +0 -1
- data/app/views/groups/new.html.erb +0 -1
- data/app/views/invitation_mailer/send_invitation.html.erb +73 -65
- data/app/views/invitations/new.html.erb +1 -2
- data/app/views/layouts/_header.erb +1 -4
- data/app/views/layouts/application.html.erb +1 -1
- data/app/views/layouts/frontpage.html.erb +0 -2
- data/app/views/message_mailer/new_message_email.html.erb +20 -0
- data/app/views/message_mailer/new_message_email.text.erb +10 -0
- data/app/views/message_mailer/reply_message_email.html.erb +20 -0
- data/app/views/message_mailer/reply_message_email.text.erb +10 -0
- data/app/views/messages/new.html.erb +0 -1
- data/app/views/messages/new.js.erb +0 -2
- data/app/views/notification_mailer/new_notification_email.html.erb +2 -5
- data/app/views/notification_mailer/new_notification_email.text.erb +2 -4
- data/app/views/notifications/activities/_like_subject.html.erb +2 -2
- data/app/views/profiles/edit.html.erb +0 -8
- data/app/views/relation/customs/index.html.erb +0 -5
- data/app/views/settings/index.html.erb +1 -2
- data/app/views/settings/index.js.erb +0 -1
- data/app/views/toolbar/_home.html.erb +0 -1
- data/app/views/toolbar/_profile.html.erb +0 -1
- data/app/views/users/index.html.erb +0 -4
- data/config/locales/en.yml +12 -3
- data/lib/generators/social_stream/base/install_generator.rb +6 -0
- data/lib/social_stream-base.rb +2 -0
- data/lib/social_stream/base/version.rb +1 -1
- data/social_stream-base.gemspec +2 -0
- data/spec/controllers/posts_controller_spec.rb +19 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/models/activity_authorization_spec.rb +10 -0
- data/spec/models/tie_spec.rb +10 -0
- data/{app → vendor}/assets/javascripts/ajax.paginate.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/.htaccess +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/adapters/jquery.js +0 -0
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +147 -0
- data/vendor/assets/javascripts/ckeditor/ckeditor_basic.js +8 -0
- data/{app → vendor}/assets/javascripts/ckeditor/ckeditor_basic_source.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/ckeditor_source.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/config.js +0 -0
- data/vendor/assets/javascripts/ckeditor/contents.css +25 -0
- data/{app → vendor}/assets/javascripts/ckeditor/images/spacer.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/lang/_languages.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/_translationstatus.txt +61 -0
- data/vendor/assets/javascripts/ckeditor/lang/af.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/da.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/de.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/el.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/es.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/et.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/he.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/is.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/it.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/km.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/no.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/th.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +6 -0
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/a11yhelp/lang/he.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/adobeair/plugin.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/ajax/plugin.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/bbcode/plugin.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/devtools/lang/en.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/devtools/plugin.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/docprops/dialogs/docprops.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/docprops/plugin.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +3 -2
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +9 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +9 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +7 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +12 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/placeholder/dialogs/placeholder.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/placeholder/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/placeholder/lang/he.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/placeholder/placeholder.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +8 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/lang/en.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/styles/styles/default.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +6 -0
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/tableresize/plugin.js +7 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/default.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/lang/en.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/lang/he.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/xml/plugin.js +6 -0
- data/vendor/assets/javascripts/ckeditor/skins/kama/dialog.css +10 -0
- data/vendor/assets/javascripts/ckeditor/skins/kama/editor.css +13 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/icons.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/icons_rtl.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/mini.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/noimage.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/sprites.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/kama/skin.js +7 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/kama/templates.css +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/office2003/dialog.css +9 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/editor.css +5 -5
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/icons.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/icons_rtl.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/images/mini.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/images/noimage.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/images/sprites.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/office2003/skin.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/office2003/templates.css +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/dialog.css +3 -3
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/editor.css +4 -4
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/icons.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/icons_rtl.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/dialog_sides.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/mini.gif +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/noimage.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/sprites.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/v2/skin.js +6 -0
- data/{app → vendor}/assets/javascripts/ckeditor/skins/v2/templates.css +0 -0
- data/vendor/assets/javascripts/ckeditor/themes/default/theme.js +8 -0
- data/{app → vendor}/assets/javascripts/hoverIntent.js +0 -0
- data/vendor/assets/javascripts/jqcloud-0.1.3.js +87 -0
- data/{app → vendor}/assets/javascripts/jquery.ba-url.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery.fcbkcomplete.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery.livequery.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery.scrollTo.min.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery.validate.js +0 -0
- data/{app → vendor}/assets/javascripts/menu.js +0 -0
- data/{app → vendor}/assets/javascripts/superfish.js +0 -0
- data/{app → vendor}/assets/javascripts/ui.checkbox.js +0 -0
- metadata +288 -257
- data/app/assets/javascripts/ckeditor/ckeditor.js +0 -141
- data/app/assets/javascripts/ckeditor/ckeditor_basic.js +0 -8
- data/app/assets/javascripts/ckeditor/contents.css +0 -45
- data/app/assets/javascripts/ckeditor/lang/_translationstatus.txt +0 -60
- data/app/assets/javascripts/ckeditor/lang/af.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/ar.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/bg.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/bn.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/bs.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/ca.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/cs.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/cy.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/da.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/de.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/el.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/en-au.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/en-ca.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/en-gb.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/en.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/eo.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/es.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/et.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/eu.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/fa.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/fi.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/fo.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/fr-ca.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/fr.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/gl.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/gu.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/he.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/hi.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/hr.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/hu.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/is.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/it.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/ja.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/km.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/ko.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/lt.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/lv.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/mn.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/ms.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/nb.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/nl.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/no.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/pl.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/pt-br.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/pt.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/ro.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/ru.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/sk.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/sl.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/sr-latn.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/sr.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/sv.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/th.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/tr.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/uk.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/vi.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/zh-cn.js +0 -6
- data/app/assets/javascripts/ckeditor/lang/zh.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/a11yhelp/lang/en.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/autogrow/plugin.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +0 -9
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +0 -9
- data/app/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +0 -7
- data/app/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -13
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +0 -11
- data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +0 -10
- data/app/assets/javascripts/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/placeholder/plugin.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -8
- data/app/assets/javascripts/ckeditor/plugins/specialchar/lang/en.js +0 -6
- data/app/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +0 -9
- data/app/assets/javascripts/ckeditor/plugins/tableresize/plugin.js +0 -7
- data/app/assets/javascripts/ckeditor/skins/kama/dialog.css +0 -9
- data/app/assets/javascripts/ckeditor/skins/kama/editor.css +0 -13
- data/app/assets/javascripts/ckeditor/skins/kama/skin.js +0 -7
- data/app/assets/javascripts/ckeditor/skins/office2003/dialog.css +0 -9
- data/app/assets/javascripts/ckeditor/skins/office2003/skin.js +0 -6
- data/app/assets/javascripts/ckeditor/skins/v2/skin.js +0 -6
- data/app/assets/javascripts/ckeditor/themes/default/theme.js +0 -8
- data/app/assets/javascripts/jqcloud-0.1.3.min.js +0 -11
- data/app/assets/javascripts/jquery.boxy.js +0 -570
- data/app/assets/javascripts/jquery.fcbkcomplete.min.js +0 -2
- data/app/assets/javascripts/menu-collapsed.js +0 -42
- data/app/assets/javascripts/modernizr.min.js +0 -4
- data/app/assets/javascripts/rails.js +0 -158
- data/app/assets/javascripts/ui.dropdownchecklist.js +0 -922
- data/app/views/contacts/_edit.html.erb +0 -76
- data/app/views/home/_menu.html.erb +0 -46
- data/app/views/posts/_header.html.erb +0 -1
- data/app/views/subjects/_tabs.html.erb +0 -38
data/.travis.yml
CHANGED
Binary file
|
Binary file
|
Binary file
|
@@ -1,10 +1,15 @@
|
|
1
|
+
//= require jquery.livequery
|
2
|
+
//
|
1
3
|
//initial state
|
2
|
-
$(
|
3
|
-
$('#
|
4
|
+
$(function() {
|
5
|
+
$('#wrapper_activities_header form').hide();
|
6
|
+
$('#new_<%= SocialStream.activity_forms.first %>').show();
|
7
|
+
$('#select_<%= SocialStream.activity_forms.first %>').addClass('selected');
|
8
|
+
});
|
4
9
|
|
5
10
|
//clicks on headers
|
6
|
-
$('.
|
7
|
-
$('.
|
11
|
+
$('.activity_form_selector').live('click',function(){
|
12
|
+
$('.activity_form_selector').removeClass('selected');
|
8
13
|
$(this).addClass('selected');
|
9
14
|
$('#wrapper_activities_header form').hide();
|
10
15
|
$('#new_'+this.id.split("_")[1]).show();
|
@@ -24,22 +29,26 @@ $('#masterSubmitButton').live('click',function(){
|
|
24
29
|
});
|
25
30
|
|
26
31
|
//javascript for main activities input
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
this.value
|
31
|
-
|
32
|
-
|
32
|
+
$(function() {
|
33
|
+
activity_input = "<%= I18n.t('activity.input') %>";
|
34
|
+
$("#input_activities").click(function(){
|
35
|
+
if(this.value == activity_input){
|
36
|
+
this.value = "";
|
37
|
+
$("#masterSubmitButton").show();
|
38
|
+
}
|
39
|
+
});
|
33
40
|
});
|
34
41
|
|
35
42
|
|
36
43
|
//javascript for comments
|
37
|
-
$(
|
38
|
-
$(".
|
44
|
+
$(function() {
|
45
|
+
$(".input_new_comments").val("<%= I18n.t('comment.input') %>");
|
46
|
+
$(".activities_comment_btn").hide();
|
47
|
+
});
|
39
48
|
|
40
49
|
//usa livequery para usar el javascript luego de una accion con AJAX
|
41
50
|
$(".input_new_comments").livequery("click",function(){
|
42
|
-
if(this.value == "<%= t('comment.input') %>"){
|
51
|
+
if(this.value == "<%= I18n.t('comment.input') %>"){
|
43
52
|
$(this).val("");
|
44
53
|
}
|
45
54
|
$(".activities_comment_btn").hide();
|
@@ -48,12 +57,12 @@ $(".input_new_comments").livequery("click",function(){
|
|
48
57
|
$(".input_new_comments").livequery("blur",function(){
|
49
58
|
if(this.value == ""){
|
50
59
|
$(".activities_comment_btn").hide();
|
51
|
-
$(this).val("<%= t('comment.input') %>");
|
60
|
+
$(this).val("<%= I18n.t('comment.input') %>");
|
52
61
|
}
|
53
62
|
});
|
54
63
|
|
55
64
|
$(".input_new_comments").click(function(){
|
56
|
-
if(this.value == "<%= t('comment.input') %>"){
|
65
|
+
if(this.value == "<%= I18n.t('comment.input') %>"){
|
57
66
|
$(this).val("");
|
58
67
|
}
|
59
68
|
$(".activities_comment_btn").hide();
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require jquery.validate
|
@@ -1,7 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
//= require hoverIntent
|
2
|
+
//= require superfish
|
3
|
+
//
|
4
|
+
$(function() {
|
5
5
|
jQuery('ul.sf-menu').superfish({
|
6
6
|
delay: 2000, // one second delay on mouseout
|
7
7
|
animation: {
|
@@ -11,13 +11,7 @@ jQuery(function(){
|
|
11
11
|
autoArrows: false,
|
12
12
|
dropShadows: false // disable drop shadows
|
13
13
|
});
|
14
|
-
|
15
|
-
|
16
|
-
});
|
17
|
-
|
18
14
|
|
19
|
-
|
20
|
-
$(document).ready(function(){
|
21
15
|
$('#tabright> ul').tabs({
|
22
16
|
fx: {
|
23
17
|
height: 'toggle',
|
@@ -25,4 +19,3 @@ $(document).ready(function(){
|
|
25
19
|
}
|
26
20
|
});
|
27
21
|
});
|
28
|
-
|
@@ -1,3 +1,5 @@
|
|
1
|
+
//= require ui.checkbox
|
2
|
+
|
1
3
|
var relations;
|
2
4
|
|
3
5
|
function checkBoxId(id) {
|
@@ -27,10 +29,14 @@ function checkBoxEnable(id) {
|
|
27
29
|
switch (checkBoxType(id)) {
|
28
30
|
|
29
31
|
case "relation_custom":
|
32
|
+
if ($('#' + id).parents().hasClass('edit_contact')) {
|
33
|
+
break;
|
34
|
+
};
|
35
|
+
|
30
36
|
$(':checkbox[id^="relation_custom"]:checked:not(#' + id + ')').checkBox('changeCheckStatus', false);
|
31
37
|
|
32
38
|
$.ajax({
|
33
|
-
url: "
|
39
|
+
url: "../permissions",
|
34
40
|
context: document.body,
|
35
41
|
data: { relation_id: checkBoxId(id) },
|
36
42
|
dataType: "script"
|
@@ -55,7 +61,11 @@ function checkBoxDisable(id) {
|
|
55
61
|
switch (checkBoxType(id)) {
|
56
62
|
|
57
63
|
case "relation_custom":
|
58
|
-
|
64
|
+
if ($('#' + id).parents().hasClass('edit_contact')) {
|
65
|
+
break;
|
66
|
+
};
|
67
|
+
|
68
|
+
$("#permissions").html("");
|
59
69
|
$("#permissions").hide();
|
60
70
|
|
61
71
|
break;
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require menu
|
@@ -199,12 +199,28 @@ textarea.new_contact_text_area{ width:100%; height: 100px; color: #2A3890;}
|
|
199
199
|
padding: 2px;
|
200
200
|
margin-right: 10px;
|
201
201
|
margin-bottom: 5px;
|
202
|
-
|
202
|
+
border: 2px solid transparent;
|
203
|
+
color: #000000;
|
204
|
+
}
|
205
|
+
|
206
|
+
.activities_title_header img{
|
207
|
+
margin-bottom: -4px;
|
208
|
+
margin-right: 4px;
|
209
|
+
}
|
210
|
+
|
211
|
+
#activity_form_select {
|
212
|
+
margin-left: 10px;
|
213
|
+
}
|
214
|
+
|
215
|
+
.activity_form_selector{
|
216
|
+
padding: 2px;
|
217
|
+
margin-bottom: 5px;
|
203
218
|
float: left;
|
204
219
|
border: 2px solid transparent;
|
220
|
+
cursor: pointer;
|
205
221
|
}
|
206
222
|
|
207
|
-
.
|
223
|
+
.activity_form_selector.selected{
|
208
224
|
border: 2px solid #46B9E8;
|
209
225
|
}
|
210
226
|
|
@@ -2,21 +2,18 @@ class ContactsController < ApplicationController
|
|
2
2
|
before_filter :authenticate_user!
|
3
3
|
|
4
4
|
def index
|
5
|
+
if params[:pending].present?
|
6
|
+
pending
|
7
|
+
return
|
8
|
+
end
|
5
9
|
@contacts =
|
6
10
|
Contact.sent_by(current_subject).
|
7
11
|
joins(:receiver).merge(Actor.alphabetic).
|
8
12
|
merge(Actor.letter(params[:letter])).
|
9
|
-
merge(Actor.search(params[:search]))
|
10
|
-
|
11
|
-
if params[:pending].present?
|
12
|
-
@contacts =
|
13
|
-
Contact.received_by(current_subject).
|
14
|
-
joins(:sender).merge(Actor.alphabetic).
|
15
|
-
merge(Actor.letter(params[:letter])).
|
16
13
|
merge(Actor.search(params[:search])).
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
active
|
15
|
+
|
16
|
+
|
20
17
|
|
21
18
|
respond_to do |format|
|
22
19
|
format.html { @contacts = @contacts.page(params[:page]).per(10) }
|
@@ -53,4 +50,15 @@ class ContactsController < ApplicationController
|
|
53
50
|
format.js
|
54
51
|
end
|
55
52
|
end
|
53
|
+
|
54
|
+
def pending
|
55
|
+
|
56
|
+
@contacts = current_subject.pending_contacts
|
57
|
+
|
58
|
+
respond_to do |format|
|
59
|
+
format.html { @contacts = Kaminari.paginate_array(@contacts).page(params[:page]).per(10) }
|
60
|
+
format.js { Kaminari.paginate_array(@contacts).page(params[:page]).per(10) }
|
61
|
+
format.json { render :text => @contacts.map{ |c| { 'key' => c.actor_id.to_s, 'value' => self.class.helpers.truncate_name(c.name) } }.to_json }
|
62
|
+
end
|
63
|
+
end
|
56
64
|
end
|
@@ -3,17 +3,25 @@ module NotificationsHelper
|
|
3
3
|
|
4
4
|
def decode_notification notification_text, activity
|
5
5
|
return if activity.nil?
|
6
|
-
notification_text = notification_text.gsub(/\%\{sender\}/, link_to(truncate_name(activity.sender.name),
|
7
|
-
|
8
|
-
|
6
|
+
notification_text = notification_text.gsub(/\%\{sender\}/, link_to(truncate_name(activity.sender.name),
|
7
|
+
url_for(:controller=> activity.sender.subject.class.to_s.downcase.pluralize,
|
8
|
+
:action=> :show, :id=> activity.sender.subject.slug, :only_path => false)))
|
9
|
+
notification_text = notification_text.gsub(/\%\{confirm\}/,link_to(t('notification.confirm'),edit_contact_url(activity.receiver.contact_to!(activity.sender))))
|
10
|
+
notification_text = notification_text.gsub(/\%\{look\}/,link_to(t('notification.look'),
|
11
|
+
url_for(:controller=> activity.sender.subject.class.to_s.downcase.pluralize,
|
12
|
+
:action=> :show, :id=> activity.sender.subject.slug, :only_path => false)))
|
9
13
|
notification_text = notification_text.gsub(/\%\{sender.name\}/,truncate_name(activity.sender.name))
|
10
14
|
|
11
15
|
if activity.direct_object.present?
|
12
16
|
object = activity.direct_object
|
13
17
|
object = object.subject if object.is_a? Actor
|
14
|
-
notification_text=notification_text.gsub(/\%\{object\}/,link_to(object.class.to_s.downcase,
|
18
|
+
notification_text=notification_text.gsub(/\%\{object\}/,link_to(object.class.to_s.downcase,
|
19
|
+
url_for(:controller=> object.class.to_s.downcase.pluralize, :action=> :show,
|
20
|
+
:id=> object.id, :only_path => false)))
|
15
21
|
notification_text=notification_text.gsub(/\%\{object.name\}/,object.class.to_s.downcase)
|
16
|
-
notification_text=notification_text.gsub(/\%\{object.text\}/,link_to(object.text.truncate(100, :separator =>' '),
|
22
|
+
notification_text=notification_text.gsub(/\%\{object.text\}/,link_to(object.text.truncate(100, :separator =>' '),
|
23
|
+
url_for(:controller=> object.class.to_s.downcase.pluralize, :action=> :show,
|
24
|
+
:id=> object.id, :only_path => false))) if object.respond_to? :text
|
17
25
|
#notification_text=notification_text.gsub(/\%\{object.image\}/,thumb_for(object)) if SocialStream.activity_forms.include? :document and object.is_a? Document
|
18
26
|
|
19
27
|
else
|
data/app/models/activity.rb
CHANGED
@@ -211,25 +211,24 @@ class Activity < ActiveRecord::Base
|
|
211
211
|
when 'create'
|
212
212
|
return false if contact.sender_id != Actor.normalize_id(subject)
|
213
213
|
|
214
|
-
|
215
|
-
|
214
|
+
val =
|
215
|
+
if relation_ids.present?
|
216
|
+
rels = Relation.normalize(relation_ids)
|
216
217
|
|
217
|
-
|
218
|
+
foreign_rels = rels.select{ |r| r.actor_id != contact.sender_id }
|
218
219
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
allow(subject, action, 'activity', :in => foreign_rels).all.size == foreign_rels.size
|
224
|
-
else
|
225
|
-
if contact.reflexive?
|
226
|
-
return true
|
220
|
+
# Only posting to own relations
|
221
|
+
foreign_rels.blank? ||
|
222
|
+
Relation.
|
223
|
+
allow(subject, action, 'activity', :in => foreign_rels).all.size == foreign_rels.size
|
227
224
|
else
|
228
|
-
|
229
|
-
|
230
|
-
|
225
|
+
contact.reflexive? ||
|
226
|
+
receiver.
|
227
|
+
relation_customs.allow(sender, 'create', 'activity').
|
228
|
+
present?
|
231
229
|
end
|
232
|
-
|
230
|
+
|
231
|
+
return val
|
233
232
|
|
234
233
|
when 'read'
|
235
234
|
return true if [contact.sender_id, contact.receiver_id].include?(Actor.normalize_id(subject)) || relations.select{ |r| r.is_a?(Relation::Public) }.any?
|
data/app/models/actor.rb
CHANGED
@@ -225,9 +225,15 @@ class Actor < ActiveRecord::Base
|
|
225
225
|
as.map(&:subject)
|
226
226
|
end
|
227
227
|
|
228
|
+
# Return a contact to subject.
|
229
|
+
def contact_to(subject)
|
230
|
+
sent_contacts.received_by(subject).first
|
231
|
+
end
|
232
|
+
|
228
233
|
# Return a contact to subject. Create it if it does not exist
|
229
234
|
def contact_to!(subject)
|
230
|
-
|
235
|
+
contact_to(subject) ||
|
236
|
+
sent_contacts.create!(:receiver_id => Actor.normalize_id(subject))
|
231
237
|
end
|
232
238
|
|
233
239
|
# This is an scaffold for a recomendations engine
|
data/app/models/relation.rb
CHANGED
data/app/models/tie.rb
CHANGED
@@ -88,7 +88,7 @@ class Tie < ActiveRecord::Base
|
|
88
88
|
#
|
89
89
|
# Create contact activity if this is the first tie
|
90
90
|
def create_activity
|
91
|
-
return if contact.reload.ties_count != 1
|
91
|
+
return if contact.reload.ties_count != 1 || relation.is_a?(Relation::Public)
|
92
92
|
|
93
93
|
Activity.create! :contact => contact,
|
94
94
|
:relation_ids => contact.relation_ids,
|
@@ -3,18 +3,12 @@
|
|
3
3
|
<%= stylesheet_link_tag "jquery-ui", :media => "screen, projection" %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<% content_for :javascript do %>
|
7
|
-
<%= render :partial => 'activities/jquery' %>
|
8
|
-
<% end -%>
|
9
|
-
|
10
6
|
<div id="wrapper_activities">
|
11
7
|
<div id="wrapper_activities_header">
|
12
8
|
<div id="activities_title" class="content_size">
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
</div>
|
17
|
-
<% end %>
|
9
|
+
<div class="activities_title_header">
|
10
|
+
<%= image_tag("btn/activity.png") %><%= t 'activity.title' %>
|
11
|
+
</div>
|
18
12
|
</div>
|
19
13
|
<%= render :partial => 'activities/new', :locals => { :receiver => owner } %>
|
20
14
|
</div>
|
@@ -18,6 +18,14 @@
|
|
18
18
|
<% end %>
|
19
19
|
</div>
|
20
20
|
|
21
|
+
<div id="activity_form_select">
|
22
|
+
<% SocialStream.activity_forms.each do |element| %>
|
23
|
+
<div id="select_<%= element %>" class="activity_form_selector">
|
24
|
+
<%= image_tag "btn/#{ element }.png", :title => t("#{ element }.form.title") %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
|
21
29
|
<div id="activities_share_btn">
|
22
30
|
<% if current_subject == receiver %>
|
23
31
|
<div id="securities"><%= select_tag :_relation_ids, options_for_select(current_subject.activity_relations(receiver).sort.map{ |r| [ r.name, r.id ] }), :id => 'security', :multiple => nil %></div>
|