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

Instance Method Details

#createableObject



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_iconObject



36
37
38
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 36

def unknown_icon
  icon_tag :unknown
end


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_missingObject



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: conflictObject



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_errorObject



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: denialObject



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: errorsObject



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_unknownObject

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_foundObject



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, ("to create it")]
  end
end

#view: server_errorObject



9
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/error.rb', line 9

view :server_error, template: :haml

#view: unknownObject



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