Merge branch 'next-minor' into develop
This commit is contained in:
commit
26a9e50ef9
743 changed files with 1528 additions and 77 deletions
|
|
@ -170,10 +170,6 @@ Layout/DotPosition:
|
|||
|
||||
### backward compatibility
|
||||
|
||||
# only with ruby >= 2.3
|
||||
Style/FrozenStringLiteralComment:
|
||||
Enabled: false
|
||||
|
||||
# only with ruby >= 2.4
|
||||
Performance/RegexpMatch:
|
||||
Enabled: false
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
* Remove auto detection of languages with highlightjs [#7591](https://github.com/diaspora/diaspora/pull/7591)
|
||||
* Move enable/disable notification icon [#7592](https://github.com/diaspora/diaspora/pull/7592)
|
||||
* Use Bootstrap 3 progress-bar for polls [#7600](https://github.com/diaspora/diaspora/pull/7600)
|
||||
* Enable frozen string literals [#7595](https://github.com/diaspora/diaspora/pull/7595)
|
||||
* Remove `rails_admin_histories` table [#7597](https://github.com/diaspora/diaspora/pull/7597)
|
||||
|
||||
## Bug fixes
|
||||
* Fix displaying polls with long answers [#7579](https://github.com/diaspora/diaspora/pull/7579)
|
||||
|
|
|
|||
2
Gemfile
2
Gemfile
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "rails", "5.1.3"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
guard :rspec, cmd: "bin/spring rspec", all_on_start: false, all_after_pass: false do
|
||||
watch(/^spec\/.+_spec\.rb$/)
|
||||
watch(/^lib\/(.+)\.rb$/) {|m| "spec/lib/#{m[1]}_spec.rb" }
|
||||
|
|
|
|||
2
Rakefile
2
Rakefile
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class AdminController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class PodsController < AdminController
|
||||
respond_to :html, :json, :mobile
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class UsersController < AdminController
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AdminsController < Admin::AdminController
|
||||
include ApplicationHelper
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Api
|
||||
module OpenidConnect
|
||||
class AuthorizationsController < ApplicationController
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Api
|
||||
module OpenidConnect
|
||||
class ClientsController < ApplicationController
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2011 nov matake
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2011 nov matake
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Api
|
||||
module OpenidConnect
|
||||
class TokenEndpointController < ApplicationController
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Api
|
||||
module OpenidConnect
|
||||
class UserApplicationsController < ApplicationController
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Api
|
||||
module OpenidConnect
|
||||
class UserInfoController < ApplicationController
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Api
|
||||
module V0
|
||||
class BaseController < ApplicationController
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2012, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class BlocksController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ConversationsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
respond_to :html, :mobile, :json, :js
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class HelpController < ApplicationController
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2012, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class InvitationCodesController < ApplicationController
|
||||
before_action :ensure_valid_invite_code
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class NodeInfoController < ApplicationController
|
||||
def jrd
|
||||
render json: NodeInfo.jrd(CGI.unescape(node_info_url("123.123").sub("123.123", "%{version}")))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ParticipationsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class PollParticipationsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ResharesController < ApplicationController
|
||||
before_action :authenticate_user!, except: :index
|
||||
respond_to :json
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SearchController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SocialRelayController < ApplicationController
|
||||
respond_to :json
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActivityStreamsHelper
|
||||
def add_activitystreams_author(target, person)
|
||||
target.author do |author|
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
@ -15,8 +17,9 @@ module ApplicationHelper
|
|||
return AppConfig.settings.changelog_url.get if AppConfig.settings.changelog_url.present?
|
||||
|
||||
url = "https://github.com/diaspora/diaspora/blob/master/Changelog.md"
|
||||
url.sub!('/master/', "/#{AppConfig.git_revision}/") if AppConfig.git_revision.present?
|
||||
url
|
||||
return url if AppConfig.git_revision.blank?
|
||||
|
||||
url.sub("/master/", "/#{AppConfig.git_revision}/")
|
||||
end
|
||||
|
||||
def source_url
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ContactsHelper
|
||||
def start_a_conversation_link(aspect, contacts_size)
|
||||
conv_opts = { class: "conversation_button contacts_button"}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ConversationsHelper
|
||||
def conversation_class(conversation, unread_count, selected_conversation_id)
|
||||
conv_class = unread_count > 0 ? "unread " : ""
|
||||
if selected_conversation_id && conversation.id == selected_conversation_id
|
||||
conv_class << "selected"
|
||||
end
|
||||
conv_class
|
||||
conv_class = unread_count > 0 ? "unread" : ""
|
||||
return conv_class unless selected_conversation_id && conversation.id == selected_conversation_id
|
||||
|
||||
"#{conv_class} selected"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module GonHelper
|
||||
def gon_load_contact(contact)
|
||||
Gon.preloads[:contacts] ||= []
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module InterimStreamHackinessHelper
|
||||
def commenting_disabled?(post)
|
||||
return true unless user_signed_in?
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module InvitationCodesHelper
|
||||
def invite_hidden_tag(invite)
|
||||
if invite.present?
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module JsxcHelper
|
||||
def get_bosh_endpoint
|
||||
proto = AppConfig.chat.server.bosh.proto
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module LanguageHelper
|
||||
include ApplicationHelper
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module MetaDataHelper
|
||||
include ActionView::Helpers::AssetUrlHelper
|
||||
include ActionView::Helpers::TagHelper
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module MobileHelper
|
||||
def mobile_reshare_icon(post)
|
||||
if (post.public? || reshare?(post)) && (user_signed_in? && post.author != current_user.person)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationsHelper
|
||||
include PeopleHelper
|
||||
include PostsHelper
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotifierHelper
|
||||
|
||||
# @param post [Post] The post object.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module OEmbedHelper
|
||||
def o_embed_html(cache)
|
||||
data = cache.data
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module OpenGraphHelper
|
||||
def og_html(cache)
|
||||
"<a href=\"#{cache.url}\" target=\"_blank\">" +
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
@ -24,11 +26,9 @@ module PeopleHelper
|
|||
end
|
||||
|
||||
def person_link(person, opts={})
|
||||
opts[:class] ||= ""
|
||||
opts[:class] << " self" if defined?(user_signed_in?) && user_signed_in? && current_user.person == person
|
||||
opts[:class] << " hovercardable" if defined?(user_signed_in?) && user_signed_in? && current_user.person != person
|
||||
css_class = person_link_class(person, opts[:class])
|
||||
remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
|
||||
"<a data-hovercard='#{remote_or_hovercard_link}' href='#{remote_or_hovercard_link}' class='#{opts[:class]}'>"\
|
||||
"<a data-hovercard='#{remote_or_hovercard_link}' href='#{remote_or_hovercard_link}' class='#{css_class}'>"\
|
||||
"#{html_escape_once(opts[:display_name] || person.name)}</a>"\
|
||||
.html_safe
|
||||
end
|
||||
|
|
@ -44,11 +44,9 @@ module PeopleHelper
|
|||
if opts[:to] == :photos
|
||||
link_to person_image_tag(person, opts[:size]), person_photos_path(person)
|
||||
else
|
||||
opts[:class] ||= ""
|
||||
opts[:class] << " self" if defined?(user_signed_in?) && user_signed_in? && current_user.person == person
|
||||
opts[:class] << " hovercardable" if defined?(user_signed_in?) && user_signed_in? && current_user.person != person
|
||||
css_class = person_link_class(person, opts[:class])
|
||||
remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
|
||||
"<a href='#{remote_or_hovercard_link}' class='#{opts[:class]}' #{ ("target=" + opts[:target]) if opts[:target]}>
|
||||
"<a href='#{remote_or_hovercard_link}' class='#{css_class}' #{('target=' + opts[:target]) if opts[:target]}>
|
||||
#{person_image_tag(person, opts[:size])}
|
||||
</a>".html_safe
|
||||
end
|
||||
|
|
@ -77,4 +75,14 @@ module PeopleHelper
|
|||
return Rails.application.routes.url_helpers.person_path(person, opts)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def person_link_class(person, css_class)
|
||||
return css_class unless defined?(user_signed_in?) && user_signed_in?
|
||||
|
||||
return "#{css_class} self" if current_user.person == person
|
||||
|
||||
"#{css_class} hovercardable"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2012, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2012, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ServicesHelper
|
||||
def contact_proxy(friend)
|
||||
friend.contact || contact_proxy_template.dup.tap {|c| c.person = friend.person }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module SessionsHelper
|
||||
def prefilled_username
|
||||
uri = Addressable::URI.parse(session["user_return_to"])
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
# licensed under the Affero General Public License version 3 or later. See
|
||||
# the COPYRIGHT file.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module TagsHelper
|
||||
def looking_for_tag_link
|
||||
return if search_query.include?('@') || normalize_tag_name(search_query).blank?
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module UserApplicationsHelper
|
||||
def user_application_name(app)
|
||||
if app.name?
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module UsersHelper
|
||||
def owner_image_tag(size=nil)
|
||||
person_image_tag(current_user.person, size)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: "\"#{AppConfig.settings.pod_name}\" <#{AppConfig.mail.sender_address}>"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class DiasporaDeviseMailer < Devise::Mailer
|
||||
default from: "\"#{AppConfig.settings.pod_name}\" <#{AppConfig.mail.sender_address}>"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ExportMailer < ApplicationMailer
|
||||
def export_complete_for(user)
|
||||
@user = user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Maintenance < ApplicationMailer
|
||||
def account_removal_warning(user)
|
||||
@user = user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class AlsoCommented < NotificationMailers::Base
|
||||
attr_accessor :comment
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class Base
|
||||
include Diaspora::Logging
|
||||
|
|
@ -52,7 +54,7 @@ module NotificationMailers
|
|||
def log_mail(recipient_id, sender_id, type)
|
||||
log_string = "event=mail mail_type=#{type} recipient_id=#{recipient_id} sender_id=#{sender_id} " \
|
||||
" recipient_handle=#{@recipient.diaspora_handle}"
|
||||
log_string << " sender_handle=#{@sender.diaspora_handle}" if sender_id.present?
|
||||
log_string = "#{log_string} sender_handle=#{@sender.diaspora_handle}" if sender_id.present?
|
||||
|
||||
logger.info log_string
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class CommentOnPost < NotificationMailers::Base
|
||||
attr_accessor :comment
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class ConfirmEmail < NotificationMailers::Base
|
||||
def set_headers
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class CsrfTokenFail < NotificationMailers::Base
|
||||
def set_headers
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class Liked < NotificationMailers::Base
|
||||
attr_accessor :like
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class Mentioned < NotificationMailers::Base
|
||||
attr_accessor :post
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class MentionedInComment < NotificationMailers::Base
|
||||
attr_reader :comment
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class PrivateMessage < NotificationMailers::Base
|
||||
attr_accessor :message, :conversation, :participants
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class Reshared < NotificationMailers::Base
|
||||
attr_accessor :reshare
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NotificationMailers
|
||||
class StartedSharing < NotificationMailers::Base
|
||||
def set_headers(*_args) # rubocop:disable Style/AccessorMethodName
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Notifier < ApplicationMailer
|
||||
helper :application
|
||||
helper :notifier
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue