complete preview for both new and announcement
This commit is contained in:
1 parent
8bd5481b3f
commit
6044857fea
24 files changed
+301
-67
No files matched your search
@@ -0,0 +1,23 @@
|
||||
module Admin::WebComponentHelper
|
||||
include ActionView::Helpers::TagHelper
|
||||
|
||||
def alert_block_tag(title="",context="",*args)
|
||||
content_tag(:div,:class=>"alert alert-block alert-error fade in") do
|
||||
a = ActiveSupport::SafeBuffer.new
|
||||
a << button_tag( 'x',:class=>"close",:data=>{:dismiss=>"alert"}) if (args.first[:close] rescue false)
|
||||
a << content_tag(:h4,:class=>"alert-heading") do
|
||||
title
|
||||
end
|
||||
a << content_tag(:p) do
|
||||
context
|
||||
end
|
||||
# TODO : 可以提供更多功能
|
||||
# a << content_tag(:p) do
|
||||
# b = link_to("Take this action","",:class=>"btn btn-danger")
|
||||
# b << link_to("Or do this","",:class=>"btn")
|
||||
# b
|
||||
# end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user