OSDN Git Service

v07
[pettanr/pettanr.git] / app / helpers / application_helper.rb
index 5a57fd5..08b0b5d 100644 (file)
@@ -1,6 +1,6 @@
 module ApplicationHelper
   def manifest
-    Pettanr::Application.manifest
+    Manifest.manifest
   end
   
   def full_url filename
@@ -25,7 +25,7 @@ module ApplicationHelper
   end
   
   def t_selected_item(name, index)
-    t(MagicNumber[name][index][0])
+    t(manifest.system_resources.select_items[name][index][0])
   end
   
   def item_tag 
@@ -35,7 +35,7 @@ module ApplicationHelper
   def icon_tag name, opt = {}
     title = opt[:object] ? (name.to_s + ' ID:' + opt[:object].id.to_s) : name
     size = opt[:size] ? opt[:size].to_i : 35
-    tag :img, :src => asset_path(name.to_s.underscore + '.gif'), :width => size, :height => size, :alt => name.to_s + ' Icon', :title => title
+    tag :img, :src => '/images/' + name.to_s.underscore + '.gif', :width => size, :height => size, :alt => name.to_s + ' Icon', :title => title
   end
   
   def author_icon opt = {}
@@ -79,17 +79,15 @@ module ApplicationHelper
   end
   
   def panel_editor_javascript_include_tags
-    writing_format_list = Pettanr::Application::manifest.list_managers[WritingFormat.item_name].open('public_list', nil, nil, @operators)
-    speech_balloon_template_list = Pettanr::Application::manifest.list_managers[SpeechBalloonTemplate.item_name].open('public_list', nil, nil, @operators)
-    writing_format_list.items.map {|wf|
+    WritingFormat.enable_list().map {|wf|
 #      javascript_include_tag wf.engine_name
-      javascript_include_tag wf.engine_name + "/application"
+      javascript_include_tag wf.template_path_name + "/application"
     }.join("\n") + 
-    speech_balloon_template_list.items.map {|sbt|
-      stylesheet_link_tag sbt.engine_name + "/application"
+    SpeechBalloonTemplate.enable_list().map {|sbt|
+      stylesheet_link_tag sbt.template_path_name + "/application"
     }.join("\n") + 
-    speech_balloon_template_list.items.map {|sbt|
-      javascript_include_tag sbt.engine_name + "/application"
+    SpeechBalloonTemplate.enable_list().map {|sbt|
+      javascript_include_tag sbt.template_path_name + "/application"
     }.join("\n")
   end