From: yasushiito Date: Mon, 27 Jan 2014 08:34:48 +0000 (+0900) Subject: add editor X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=811d10577a596b37a2e950ec6ab0b3ac2ef2a2c2;p=pettanr%2Fpettanr.git add editor --- diff --git a/app/models/panel.rb b/app/models/panel.rb index 723bdb2a..137b2c0f 100644 --- a/app/models/panel.rb +++ b/app/models/panel.rb @@ -23,7 +23,7 @@ class Panel < Pettanr::Content end def self.each_element_class_names - Pettanr::Application.manifest.system_resources.elements.each do |k, n| + Manifest.manifest.system_resources.elements.each do |k, n| yield k end end diff --git a/app/views/templates/r/editor/dock/_bay_bodys.html.erb b/app/views/templates/r/editor/dock/_bay_bodys.html.erb index b4d94815..b2b98864 100644 --- a/app/views/templates/r/editor/dock/_bay_bodys.html.erb +++ b/app/views/templates/r/editor/dock/_bay_bodys.html.erb @@ -1,5 +1,3 @@ -
> - <% bay.tabs.each do |board| %> - <%= render board.body.bucket.template_name, :form => board.body.bucket %> - <% end %> -
+<% dock.tabs.each do |tab| %> + <%= render tab.body.template_name, :bay => tab %> +<% end %> diff --git a/app/views/templates/r/editor/dock/_bay_label.html.erb b/app/views/templates/r/editor/dock/_bay_label.html.erb index 33d35feb..b304c75f 100644 --- a/app/views/templates/r/editor/dock/_bay_label.html.erb +++ b/app/views/templates/r/editor/dock/_bay_label.html.erb @@ -1,5 +1,5 @@ -
  • > -
    - <%= render label.face_template_name, :elm => label.element %> -
    +
  • + + <%= label.caption %> +
  • diff --git a/app/views/templates/r/editor/dock/_bay_labels.html.erb b/app/views/templates/r/editor/dock/_bay_labels.html.erb index e303ec9a..bf2b647a 100644 --- a/app/views/templates/r/editor/dock/_bay_labels.html.erb +++ b/app/views/templates/r/editor/dock/_bay_labels.html.erb @@ -1,7 +1,5 @@ -
    - -
    + diff --git a/app/views/templates/r/editor/dock/_board_bodys.html.erb b/app/views/templates/r/editor/dock/_board_bodys.html.erb new file mode 100644 index 00000000..b4d94815 --- /dev/null +++ b/app/views/templates/r/editor/dock/_board_bodys.html.erb @@ -0,0 +1,5 @@ +
    > + <% bay.tabs.each do |board| %> + <%= render board.body.bucket.template_name, :form => board.body.bucket %> + <% end %> +
    diff --git a/app/views/templates/r/editor/dock/_board_label.html.erb b/app/views/templates/r/editor/dock/_board_label.html.erb new file mode 100644 index 00000000..33d35feb --- /dev/null +++ b/app/views/templates/r/editor/dock/_board_label.html.erb @@ -0,0 +1,5 @@ +
  • > +
    + <%= render label.face_template_name, :elm => label.element %> +
    +
  • diff --git a/app/views/templates/r/editor/dock/_board_labels.html.erb b/app/views/templates/r/editor/dock/_board_labels.html.erb new file mode 100644 index 00000000..e303ec9a --- /dev/null +++ b/app/views/templates/r/editor/dock/_board_labels.html.erb @@ -0,0 +1,7 @@ +
    + +
    diff --git a/app/views/templates/r/editor/dock/_dock_bodys.html.erb b/app/views/templates/r/editor/dock/_dock_bodys.html.erb deleted file mode 100644 index b2b98864..00000000 --- a/app/views/templates/r/editor/dock/_dock_bodys.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<% dock.tabs.each do |tab| %> - <%= render tab.body.template_name, :bay => tab %> -<% end %> diff --git a/app/views/templates/r/editor/dock/_dock_label.html.erb b/app/views/templates/r/editor/dock/_dock_label.html.erb deleted file mode 100644 index b304c75f..00000000 --- a/app/views/templates/r/editor/dock/_dock_label.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -
  • - - <%= label.caption %> - -
  • diff --git a/app/views/templates/r/editor/dock/_dock_labels.html.erb b/app/views/templates/r/editor/dock/_dock_labels.html.erb deleted file mode 100644 index bf2b647a..00000000 --- a/app/views/templates/r/editor/dock/_dock_labels.html.erb +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/lib/editor/dock.rb b/lib/editor/dock.rb index 487877d6..114a17dc 100644 --- a/lib/editor/dock.rb +++ b/lib/editor/dock.rb @@ -57,11 +57,11 @@ module Editor end def labels_template_name - self.template_dir + 'dock_labels' + self.template_dir + 'bay_labels' end def bodys_template_name - self.template_dir + 'dock_bodys' + self.template_dir + 'bay_bodys' end def dom_id diff --git a/lib/editor/dock/bay.rb b/lib/editor/dock/bay.rb index 8d82c0af..ffbc5561 100644 --- a/lib/editor/dock/bay.rb +++ b/lib/editor/dock/bay.rb @@ -18,11 +18,11 @@ module Editor end def labels_template_name - self.template_dir + 'bay_labels' + self.template_dir + 'board_labels' end def bodys_template_name - self.template_dir + 'bay_bodys' + self.template_dir + 'board_bodys' end def dom_id @@ -75,7 +75,7 @@ module Editor class BayLabel < Label def template_file_name - 'dock_label' + 'bay_label' end def bay diff --git a/lib/editor/dock/bay/board/element.rb b/lib/editor/dock/bay/board/element.rb index 43315d01..0d430519 100644 --- a/lib/editor/dock/bay/board/element.rb +++ b/lib/editor/dock/bay/board/element.rb @@ -14,7 +14,7 @@ module Editor class ElementBoardLabel < BoardLabel def template_file_name - 'bay_label' + 'board_label' end def face_template_name diff --git a/lib/editor/dock/bay/board/torder.rb b/lib/editor/dock/bay/board/torder.rb index 6b49e601..04e5cbab 100644 --- a/lib/editor/dock/bay/board/torder.rb +++ b/lib/editor/dock/bay/board/torder.rb @@ -14,7 +14,7 @@ module Editor class TorderBoardLabel < BoardLabel def template_file_name - 'bay_label' + 'board_label' end def face_template_name diff --git a/lib/editor/dock/bay/board/zorder.rb b/lib/editor/dock/bay/board/zorder.rb index e822825e..f55b2f10 100644 --- a/lib/editor/dock/bay/board/zorder.rb +++ b/lib/editor/dock/bay/board/zorder.rb @@ -18,7 +18,7 @@ module Editor class ZorderBoardLabel < BoardLabel def template_file_name - 'bay_label' + 'board_label' end def face_template_name