class Decidim::Meetings::AdminLog::ValueTypes::OrganizerPresenter
the ‘DefaultPresenter` for more info on how value presenters work.
This class presents the given value as a Decidim::Meetings::Organizer. Check
def organizer
def organizer @organizer ||= Decidim::User.find_by(id: value) end
def present
be found, it shows its title. Otherwise it shows its ID.
Public: Presents the value as a Decidim::Meetings::Organizer. If the result can
def present return unless value return present_organizer if organizer I18n.t("not_found", id: value, scope: "decidim.meetings.admin_log.meeting.value_types.organizer_presenter") end
def present_organizer
def present_organizer return content_tag(:span, present_user_name, class: "logs__log__author") if organizer.blank? link_to( present_user_name, user_path, class: "logs__log__author", title: "@" + present_user_nickname, target: "_blank", data: { tooltip: true, "disable-hover": false } ) end
def present_user_name
Private: Presents the name of the organizer performing the action.
def present_user_name organizer.name.html_safe end
def present_user_nickname
Private: Presents the nickname of the organizer performing the action.
def present_user_nickname organizer.nickname.html_safe end
def user_path
user profile. It's a public link.
Private: Calculates the path for the organizer. Returns the path of the
def user_path decidim.profile_path(present_user_nickname) end