mod/standard/set/all/rich_html/error.rb in card-1.97.0.1 vs mod/standard/set/all/rich_html/error.rb in card-1.98.0
- old
+ new
@@ -5,11 +5,11 @@
error_page = BetterErrors::ErrorPage.new Card::Error.current,
"PATH_INFO" => request.env["REQUEST_URI"]
haml :debug_server_error, {}, error_page
end
- view :message, perms: :none, tags: :unknown_ok do
+ view :message, perms: :none, unknown: true do
frame { params[:message] }
end
view :missing do
createable do
@@ -21,11 +21,11 @@
card.ok?(:create) ? yield : ""
end
def missing_link text
path_opts = voo.type ? { card: { type: voo.type } } : {}
- link_to_view :new, text, path: path_opts, class: "missing-link"
+ link_to_view :new, text, path: path_opts, class: classy("missing-link")
end
view :closed_missing, perms: :none do
wrap_with :span, h(title_in_context), class: "faint"
end
@@ -74,11 +74,11 @@
else super
end
end
def commentable? view
- return false unless self.class.tagged(view, :comment) &&
+ return false unless view_setting(:commentable, view) &&
show_view?(:comment_box, :hide)
ok? :comment
end
@@ -148,17 +148,18 @@
[tr(:please), links, to_task].join(" ") + "."
end
end
def signin_link
- link_to_card :signin, tr(:sign_in), remote: true, class: "slotter"
+ link_to_card :signin, tr(:sign_in),
+ class: "signin-link", slotter: true, path: { view: :open }
end
def signup_link
return unless signup_ok?
- link_to tr(:sign_up), path: { action: :new, mark: :signup },
- remote: true, class: "slotter"
+ link_to_card :signup, tr(:sign_up),
+ class: "signup-link", slotter: true, path: { action: :new }
end
def signup_ok?
Card.new(type_id: Card::SignupID).ok? :create
end