Fix bug
This commit is contained in:
parent
94a9807543
commit
564620482a
|
@ -383,6 +383,14 @@ module AnnouncementsHelper
|
|||
end
|
||||
html = Nokogiri::HTML.parse(html)
|
||||
html.css('.i-annc__page-title').remove
|
||||
dates = html.css("*[date-format]")
|
||||
if !dates.blank?
|
||||
dates.each do |d|
|
||||
format = d.attributes["date-format"].value
|
||||
date = DateTime.parse(d.inner_text)
|
||||
d.inner_html = d.inner_html.gsub(d.inner_text.strip, " " + date.strftime(format))
|
||||
end
|
||||
end
|
||||
html.css("body").to_html.html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"%>
|
||||
<%= stylesheet_link_tag "bootstrap/bootstrap.min.css"%>
|
||||
<%= stylesheet_link_tag "template/template"%>
|
||||
<%= javascript_include_tag "jquery.min"%>
|
||||
<%= javascript_include_tag "bootstrap.min"%>
|
||||
</head>
|
||||
<body>
|
||||
<% params = {:layout_type => 'annc_index1',:target_controller=>'announcements',:target_action=>'show_widget'} %>
|
||||
<% @target_action = "show_widget" %>
|
||||
<%=render_view_for_annc((params[:layout_type].blank? ? params[:layout_type] : 'annc_index1'))%>
|
||||
<%=render_view_for_annc((!params[:layout_type].blank? ? params[:layout_type] : 'annc_index1'))%>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue