Module: Card::Set::All::Html::Error::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb
Instance Method Summary collapse
-
#createable ⇒ Object
-
#unknown_icon ⇒ Object
-
#unknown_link(text) ⇒ Object
-
#view: compact_missing ⇒ Object
-
#view: conflict ⇒ Object
-
#view: debug_server_error ⇒ Object
-
#view: denial ⇒ Object
-
#view: errors ⇒ Object
-
#view: mini_unknown ⇒ Object
icon only, no wrap.
-
#view: not_found ⇒ Object
-
#view: server_error ⇒ Object
-
#view: unknown ⇒ Object
Instance Method Details
#createable ⇒ Object
26 27 28 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 26 def createable card.ok?(:create) ? yield : "" end |
#unknown_icon ⇒ Object
36 37 38 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 36 def unknown_icon icon_tag :unknown end |
#unknown_link(text) ⇒ Object
30 31 32 33 34 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 30 def unknown_link text link_to_view :new_in_modal, text, path: (voo.type ? { card: { type: voo.type } } : {}), class: classy("unknown-link") end |
#view: compact_missing ⇒ Object
40 41 42 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 40 view :compact_missing, perms: :none do wrap_with :span, h(title_in_context), class: "text-muted" end |
#view: conflict ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 44 view :conflict, cache: :never do actor_link = link_to_card card.last_action.act.actor.name class_up "card-slot", "error-view" wrap do # LOCALIZE alert "warning" do %( <strong>Conflict!</strong> <span class="new-current-revision-id">#{card.last_action_id}</span> <div>#{actor_link} has also been making changes.</div> <div>Please examine below, resolve above, and re-submit.</div> #{render_act} ) end end end |
#view: debug_server_error ⇒ Object
11 12 13 14 15 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 11 view :debug_server_error, wrap: { modal: { size: :full } } do error_page = BetterErrors::ErrorPage.new Card::Error.current, "PATH_INFO" => request.env["REQUEST_URI"] haml :debug_server_error, {}, error_page end |
#view: denial ⇒ Object
82 83 84 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 82 view :denial do focal? ? loud_denial : quiet_denial end |
#view: errors ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 60 view :errors, perms: :none do return if card.errors.empty? voo.title = if card.name.blank? "Problems" else t(:format_problems_name, cardname: card.name) end voo.hide! :menu class_up "alert", "card-error-msg" standard_errors voo.title end |
#view: mini_unknown ⇒ Object
icon only, no wrap
22 23 24 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 22 view :mini_unknown, unknown: true, cache: :never do createable { unknown_link unknown_icon } end |
#view: not_found ⇒ Object
74 75 76 77 78 79 80 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 74 view :not_found, cache: :never do voo.hide! :menu voo.title = "Not Found" frame do [not_found_errors, sign_in_or_up_links("to create it")] end end |
#view: server_error ⇒ Object
9 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 9 view :server_error, template: :haml |
#view: unknown ⇒ Object
17 18 19 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 17 view :unknown do createable { wrap { unknown_link "#{unknown_icon} #{render_title}" } } end |