style for front end
This commit is contained in:
parent
5178ce3bde
commit
69a49a69aa
|
@ -3,6 +3,10 @@
|
||||||
<%= t("default_widget.select_widget_style") %>
|
<%= t("default_widget.select_widget_style") %>
|
||||||
</label>
|
</label>
|
||||||
<div class="controls well">
|
<div class="controls well">
|
||||||
|
<% if @frontend_styles%>
|
||||||
|
<%= select('page', 'frontend_style', @frontend_styles) %>
|
||||||
|
<% else %>
|
||||||
<%= t("default_widget.no_support_setting")%>
|
<%= t("default_widget.no_support_setting")%>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -33,15 +33,20 @@ module OrbitApp
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_module_app_format #For ModuleApp to fetch data
|
def to_module_app_format #For ModuleApp to fetch data
|
||||||
@frontend_pages.collect{|t| [t.get_i18n,t.name]}
|
result = {}
|
||||||
|
@frontend_pages.collect do |t|
|
||||||
|
result[t.name] = {:i18n=>t.get_i18n,:style=>t.get_style}
|
||||||
|
end
|
||||||
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class AppPage
|
class AppPage
|
||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
attr_reader :style
|
||||||
def initialize(name,&block)
|
def initialize(name,&block)
|
||||||
|
@style
|
||||||
@name = name
|
@name = name
|
||||||
@frontend_i18n = 'rulingcom.errors.init.app_page_noname'
|
@frontend_i18n = 'rulingcom.errors.init.app_page_noname'
|
||||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||||
|
@ -59,6 +64,14 @@ module OrbitApp
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_style
|
||||||
|
@style
|
||||||
|
end
|
||||||
|
|
||||||
|
def style(ary)# []
|
||||||
|
@style = ary
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
end# of AppPage
|
end# of AppPage
|
||||||
|
|
|
@ -14,6 +14,7 @@ module Announcement
|
||||||
front_end do
|
front_end do
|
||||||
app_page 'bulletins' do
|
app_page 'bulletins' do
|
||||||
frontend_i18n "announcement.frontend.bulletins"
|
frontend_i18n "announcement.frontend.bulletins"
|
||||||
|
style ["1","2","3"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Reference in New Issue