Module: Card::Set::TypePlusRight::User::Follow::HtmlFormat

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb,
card/tmpsets/set/mod026-card-mod-follow/type_plus_right/user/follow.rb

Instance Method Summary collapse

Instance Method Details

#pointer_items(args) ⇒ Object



63
64
65
66
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 63

def pointer_items args
  voo.items[:view] ||= :link
  super(args)
end

#show_button?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 59

def show_button?
  card.current_user? || Auth.always_ok?
end

#view: coreObject

renders follow tab and ignore tab



45
46
47
48
49
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 45

view :core do
  tabs FOLLOW_TABS, "follow_tab", load: :lazy do
    render_follow_tab
  end
end

#view: editObject



40
41
42
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 40

view :edit do
  render :open
end

#view: errorsObject

TODO: research and generalize this does not look specific to following!



70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 70

view :errors, perms: :none do
  return unless card.errors.any?

  if card.errors.find { |attrib, _msg| attrib == :permission_denied }
    Env.save_interrupted_action(request.env["REQUEST_URI"])
    voo.title = "Problems with #{card.name}"
    class_up "d0-card-frame", "card card-warning card-inverse"
    frame do
      "Please #{link_to_card :signin, 'sign in'}" # " #{to_task}"
    end
  else
    super()
  end
end

#view: follow_tabObject



51
52
53
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 51

view :follow_tab, cache: :never do
  haml :follow_editor, items_method: :following_rules_and_options
end

#view: ignore_tabObject



55
56
57
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 55

view :ignore_tab, cache: :never do
  haml :follow_editor, items_method: :ignoring_rules_and_options
end

#view: one_line_contentObject



36
37
38
# File 'card/tmpsets/set/mod025-card-mod-follow/type_plus_right/user/follow.rb', line 36

view :one_line_content do
  ""
end