Fix bugs and changes for nccu
This commit is contained in:
1 parent
f8d1d7242d
commit
70b4c83cf5
23 files changed
+100
-456
No files matched your search
@@ -99,7 +99,7 @@ module ParserBackEnd
|
||||
ret = ''
|
||||
if (tag.attributes["main"] == "true" && !page.module_app.nil?)
|
||||
ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}?inner=true&page_id=#{page.id}"
|
||||
ret << "&bulletin_category_id=#{page.category}" if page.category
|
||||
ret << "&bulletin_category_id=#{page.category}" if page[:category]
|
||||
ret << "'></div>"
|
||||
else
|
||||
part = page.page_parts.detect{ |p| p.name.to_s == tag.attr['name'].to_s }
|
||||
|
||||
@@ -6,7 +6,7 @@ module ParserCommon
|
||||
if current != 0
|
||||
res << "<div class='rc_dm'>"
|
||||
item = rand(100000)
|
||||
res << "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='dm_ctrl' rel='#{item}'>#{page.name}<span class='down'></span></a>"
|
||||
res << "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='dm_ctrl' rel='#{item}'>#{page.i18n_variable[I18n.locale]}<span class='down'></span></a>"
|
||||
if page.children.size > 0
|
||||
res << "<div id='#{item}' class='dm_list #{menu.values['class_#{current}']}'>"
|
||||
res << "<ul class='ini_list'>"
|
||||
@@ -22,7 +22,7 @@ module ParserCommon
|
||||
res << "</div>"
|
||||
else
|
||||
res << '<ul>'
|
||||
res << "<li>" + "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='dm_ctrl'>#{page.name}</a>" + "</li>"
|
||||
res << "<li>" + "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='dm_ctrl'>#{page.i18n_variable[I18n.locale]}</a>" + "</li>"
|
||||
page.children.each do |child|
|
||||
res << "<li>" + menu_level(child, current + 1, menu, edit) + "</li>"
|
||||
end
|
||||
@@ -39,7 +39,7 @@ module ParserCommon
|
||||
if page.children.size > 0
|
||||
res << menu_level(page, current + 1, menu, edit)
|
||||
else
|
||||
res << "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='nav dm_ctrl'>#{page.name}</a>"
|
||||
res << "<a href='#{edit ? admin_page_path(page.id) : page.full_name}' class='nav dm_ctrl'>#{page.i18n_variable[I18n.locale]}</a>"
|
||||
end
|
||||
res << "</li>"
|
||||
end
|
||||
|
||||
@@ -126,7 +126,7 @@ module ParserFrontEnd
|
||||
ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}"
|
||||
ret << "/#{id}" if id
|
||||
ret << "?inner=true&page_id=#{page.id}"
|
||||
ret << "&bulletin_category_id=#{page.category}" if page.category
|
||||
ret << "&bulletin_category_id=#{page.category}" if page[:category]
|
||||
ret << "'></div>"
|
||||
else
|
||||
part = page.page_parts.detect{ |p| p.name.to_s == tag.attr['name'].to_s } rescue nil
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# encoding: utf-8
|
||||
|
||||
namespace :add_content do
|
||||
|
||||
task :build => :environment do
|
||||
|
||||
ModuleApp.new.from_json(File.open("#{Rails.root}/vendor/built_in_modules/page_content/page_content.json").read).save
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user