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

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb

Instance Method Summary collapse

Instance Method Details

#pointer_items(args) ⇒ Object



64
65
66
67
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 64

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

#show_button?Boolean

Returns:

  • (Boolean)


60
61
62
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 60

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

#view: coreObject

renders follow tab and ignore tab



46
47
48
49
50
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 46

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

#view: editObject



41
42
43
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 41

view :edit do
  render :open
end

#view: errorsObject

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



72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 72

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



52
53
54
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 52

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

#view: ignore_tabObject



56
57
58
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 56

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

#view: one_line_contentObject



37
38
39
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb', line 37

view :one_line_content do
  ""
end