Class: Card::Act::ActRenderer::RelativeActRenderer
Instance Method Summary
collapse
#absolute_title, #accordion_expand_link, #accordion_expand_options, #act_accordion, #act_accordion_body, #act_accordion_heading, #act_accordion_panel, #act_panel_options, #action_header?, #approved_actions, #collapse_id, #count_types, #details, #edited_ago, #header, #initialize, #link_to_act_card, #link_to_history, #method_missing, #previous_action, #render, #respond_to_missing?, #rollback_link, #show_or_hide_changes_link, #summary
#bootstrap, #bs
#components, #include_component, #load_components, #to_const
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Card::Act::ActRenderer
Instance Method Details
#act_links ⇒ Object
17
18
19
20
|
# File 'mod/history/lib/card/act/act_renderer/relative_act_renderer.rb', line 17
def act_links
return unless (content = rollback_or_edit_link)
wrap_with :small, content
end
|
#actions ⇒ Object
35
36
37
|
# File 'mod/history/lib/card/act/act_renderer/relative_act_renderer.rb', line 35
def actions
@actions ||= @act.actions_affecting(@card)
end
|
#current_act? ⇒ Boolean
31
32
33
|
# File 'mod/history/lib/card/act/act_renderer/relative_act_renderer.rb', line 31
def current_act?
@act.id == @format.card.last_act.id
end
|
#rollback_or_edit_link ⇒ Object
22
23
24
25
26
27
28
29
|
# File 'mod/history/lib/card/act/act_renderer/relative_act_renderer.rb', line 22
def rollback_or_edit_link
if @act.draft?
autosaved_draft_link text: "continue editing",
class: "collapse #{collapse_id}"
elsif !current_act?
rollback_link
end
end
|
#subtitle ⇒ Object
12
13
14
15
|
# File 'mod/history/lib/card/act/act_renderer/relative_act_renderer.rb', line 12
def subtitle
return "" unless @act.card_id != @format.card.id
wrap_with :small, "act on #{absolute_title}"
end
|
#title ⇒ Object
5
6
7
8
9
10
|
# File 'mod/history/lib/card/act/act_renderer/relative_act_renderer.rb', line 5
def title
"<span class=\"nr\">##{@args[:act_seq]}</span>" +
accordion_expand_link(@act.actor.name) +
" " +
wrap_with(:small, edited_ago)
end
|