circle_speech_balloon 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +29 -0
  4. data/app/assets/javascripts/circle_speech_balloon/application.js +15 -0
  5. data/app/assets/javascripts/circle_speech_balloon/balloons.js +2 -0
  6. data/app/assets/javascripts/circle_speech_balloon/speech_balloons.js +2 -0
  7. data/app/assets/javascripts/circle_speech_balloon/speeches.js +2 -0
  8. data/app/assets/stylesheets/circle_speech_balloon/application.css +13 -0
  9. data/app/assets/stylesheets/circle_speech_balloon/balloons.css +4 -0
  10. data/app/assets/stylesheets/circle_speech_balloon/speech_balloons.css +4 -0
  11. data/app/assets/stylesheets/circle_speech_balloon/speeches.css +4 -0
  12. data/app/controllers/circle_speech_balloon/application_controller.rb +4 -0
  13. data/app/controllers/circle_speech_balloon/balloons_controller.rb +6 -0
  14. data/app/controllers/circle_speech_balloon/speech_balloons_controller.rb +6 -0
  15. data/app/controllers/circle_speech_balloon/speeches_controller.rb +6 -0
  16. data/app/helpers/circle_speech_balloon/application_helper.rb +4 -0
  17. data/app/helpers/circle_speech_balloon/balloons_helper.rb +4 -0
  18. data/app/helpers/circle_speech_balloon/speech_balloons_helper.rb +4 -0
  19. data/app/helpers/circle_speech_balloon/speeches_helper.rb +4 -0
  20. data/app/models/circle_speech_balloon/balloon.rb +5 -0
  21. data/app/models/circle_speech_balloon/speech.rb +5 -0
  22. data/app/models/circle_speech_balloon/speech_balloon.rb +5 -0
  23. data/app/views/circle_speech_balloon/balloons/_form.html.erb +32 -0
  24. data/app/views/circle_speech_balloon/speech_balloons/_form.html.erb +38 -0
  25. data/app/views/circle_speech_balloon/speech_balloons/_standard.html.erb +6 -0
  26. data/app/views/circle_speech_balloon/speech_balloons/edit.html.erb +7 -0
  27. data/app/views/circle_speech_balloon/speech_balloons/new.html.erb +7 -0
  28. data/app/views/circle_speech_balloon/speech_balloons/show.html.erb +92 -0
  29. data/app/views/circle_speech_balloon/speeches/_form.html.erb +16 -0
  30. data/app/views/layouts/circle_speech_balloon/application.html.erb +14 -0
  31. data/config/routes.rb +2 -0
  32. data/db/circle_speech_balloon_templates.json +190 -0
  33. data/db/migrate/20130629042309_create_circle_speech_balloon_speech_balloons.rb +8 -0
  34. data/db/migrate/20130629042351_create_circle_speech_balloon_balloons.rb +8 -0
  35. data/db/migrate/20130629042410_create_circle_speech_balloon_speeches.rb +8 -0
  36. data/db/r0.png +0 -0
  37. data/db/r1.png +0 -0
  38. data/db/r10.png +0 -0
  39. data/db/r11.png +0 -0
  40. data/db/r12.png +0 -0
  41. data/db/r13.png +0 -0
  42. data/db/r14.png +0 -0
  43. data/db/r15.png +0 -0
  44. data/db/r2.png +0 -0
  45. data/db/r3.png +0 -0
  46. data/db/r4.png +0 -0
  47. data/db/r5.png +0 -0
  48. data/db/r6.png +0 -0
  49. data/db/r7.png +0 -0
  50. data/db/r8.png +0 -0
  51. data/db/r9.png +0 -0
  52. data/db/work/circle_speech_balloon_templates.json +1 -0
  53. data/db/work/r0.png +0 -0
  54. data/db/work/r1.png +0 -0
  55. data/db/work/r10.png +0 -0
  56. data/db/work/r11.png +0 -0
  57. data/db/work/r12.png +0 -0
  58. data/db/work/r13.png +0 -0
  59. data/db/work/r14.png +0 -0
  60. data/db/work/r15.png +0 -0
  61. data/db/work/r2.png +0 -0
  62. data/db/work/r3.png +0 -0
  63. data/db/work/r4.png +0 -0
  64. data/db/work/r5.png +0 -0
  65. data/db/work/r6.png +0 -0
  66. data/db/work/r7.png +0 -0
  67. data/db/work/r8.png +0 -0
  68. data/db/work/r9.png +0 -0
  69. data/lib/circle_speech_balloon.rb +72 -0
  70. data/lib/circle_speech_balloon/engine.rb +5 -0
  71. data/lib/circle_speech_balloon/version.rb +3 -0
  72. data/lib/tasks/circle_speech_balloon_tasks.rake +4 -0
  73. metadata +149 -0
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2013 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = CircleSpeechBalloon
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'CircleSpeechBalloon'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
24
+ load 'rails/tasks/engine.rake'
25
+
26
+
27
+
28
+ Bundler::GemHelper.install_tasks
29
+
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_tree .
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ module CircleSpeechBalloon
2
+ class ApplicationController < ::ApplicationController
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ require_dependency "circle_speech_balloon/application_controller"
2
+
3
+ module CircleSpeechBalloon
4
+ class BalloonsController < ApplicationController
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require_dependency "circle_speech_balloon/application_controller"
2
+
3
+ module CircleSpeechBalloon
4
+ class SpeechBalloonsController < ApplicationController
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ require_dependency "circle_speech_balloon/application_controller"
2
+
3
+ module CircleSpeechBalloon
4
+ class SpeechesController < ApplicationController
5
+ end
6
+ end
@@ -0,0 +1,4 @@
1
+ module CircleSpeechBalloon
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module CircleSpeechBalloon
2
+ module BalloonsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module CircleSpeechBalloon
2
+ module SpeechBalloonsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module CircleSpeechBalloon
2
+ module SpeechesHelper
3
+ end
4
+ end
@@ -0,0 +1,5 @@
1
+ module CircleSpeechBalloon
2
+ class Balloon < ActiveRecord::Base
3
+ # attr_accessible :title, :body
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module CircleSpeechBalloon
2
+ class Speech < ActiveRecord::Base
3
+ # attr_accessible :title, :body
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module CircleSpeechBalloon
2
+ class SpeechBalloon < ActiveRecord::Base
3
+ # attr_accessible :title, :body
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+
2
+ <div class="field">
3
+ <%= f.label :x %><br />
4
+ <%= f.number_field :x, :id => balloon.field_tag_id(:x), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :x, :tree => balloon.field_tree(:x) %>
5
+ </div>
6
+
7
+ <div class="field">
8
+ <%= f.label :y %><br />
9
+ <%= f.number_field :y, :id => balloon.field_tag_id(:y), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :y, :tree => balloon.field_tree(:y) %>
10
+ </div>
11
+
12
+ <div class="field">
13
+ <%= f.label :width %><br />
14
+ <%= f.number_field :width, :id => balloon.field_tag_id(:width), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :width, :tree => balloon.field_tree(:width) %>
15
+ </div>
16
+
17
+ <div class="field">
18
+ <%= f.label :height %><br />
19
+ <%= f.number_field :height, :id => balloon.field_tag_id(:height), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :height, :tree => balloon.field_tree(:height) %>
20
+ </div>
21
+
22
+ <div class="field">
23
+ <%= f.label :r %><br />
24
+ <%= f.number_field :r, :id => balloon.field_tag_id(:r), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :r, :tree => balloon.field_tree(:r) %>
25
+ </div>
26
+
27
+ <%= f.hidden_field :system_picture_id, :id => balloon.field_tag_id(:system_picture_id), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :system_picture_id, :tree => balloon.field_tree(:system_picture_id) %>
28
+ <%= f.hidden_field :settings, :id => balloon.field_tag_id(:settings), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :settings, :tree => balloon.field_tree(:settings) %>
29
+ <%= f.hidden_field :speech_balloon_id, :id => balloon.field_tag_id(:speech_balloon_id), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :speech_balloon_id, :tree => balloon.field_tree(:speech_balloon_id) %>
30
+ <% unless balloon.new_record? %>
31
+ <%= f.hidden_field :id, :id => balloon.field_tag_id(:id), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :id, :tree => balloon.field_tree(:id) %>
32
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <%= form_for(speech_balloon) do |f| %>
2
+ <%= render 'system/error_explanation', :obj => speech_balloon %>
3
+ <%= render 'system/error_explanation', :obj => speech_balloon_extend %>
4
+ <%= render 'system/error_explanation', :obj => balloon_extend %>
5
+ <%= render 'system/error_explanation', :obj => speech_extend %>
6
+
7
+ <div class="field">
8
+ <%= f.label :caption %><br />
9
+ <%= f.number_field :caption, :id => speech_balloon.field_tag_id(:caption), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :caption, :tree => speech_balloon.field_tree(:caption) %>
10
+ </div>
11
+ <div class="field">
12
+ <%= f.label :z %><br />
13
+ <%= f.number_field :z, :id => speech_balloon.field_tag_id(:z), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :z, :tree => speech_balloon.field_tree(:z) %>
14
+ </div>
15
+ <div class="field">
16
+ <%= f.label :t %><br />
17
+ <%= f.number_field :t, :id => speech_balloon.field_tag_id(:t), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :t, :tree => speech_balloon.field_tree(:t) %>
18
+ </div>
19
+
20
+ <%= f.fields_for(:balloon) do |bf| %>
21
+ <%= render speech_balloon.speech_balloon_template.engine_name + '/balloons/form', :f => bf, :balloon => speech_balloon.balloon %>
22
+ <% end %>
23
+
24
+ <%= f.fields_for(:speech) do |sf| %>
25
+ <%= render speech_balloon.speech_balloon_template.engine_name + '/speeches/form', :f => sf, :speech => speech_balloon.speech %>
26
+ <% end %>
27
+
28
+ <%= f.hidden_field :panel_id, :id => speech_balloon.field_tag_id(:panel_id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :panel_id, :tree => speech_balloon.field_tree(:panel_id) %>
29
+ <%= f.hidden_field :classname, :id => speech_balloon.field_tag_id(:classname), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :classname, :tree => speech_balloon.field_tree(:classname) %>
30
+ <%= f.hidden_field :speech_balloon_template_id, :id => speech_balloon.field_tag_id(:speech_balloon_template_id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :speech_balloon_template_id, :tree => speech_balloon.field_tree(:speech_balloon_template_id) %>
31
+ <% unless speech_balloon.new_record? %>
32
+ <%= f.hidden_field :id, :id => speech_balloon.field_tag_id(:id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :id, :tree => speech_balloon.field_tree(:id) %>
33
+ <% end %>
34
+
35
+ <div class="actions">
36
+ <%= f.submit t('speech_balloons.submit'), :class => "submit" %>
37
+ </div>
38
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <b><%= t_m 'Panel.caption' -%>:</b>
2
+ <%= h(panel.caption) %>
3
+ <%= render 'panels/body', :panel => panel, :author => author, :spot => spot %>
4
+ <%= render 'panels/footer', :panel => panel, :author => author %>
5
+ <%= render 'panels/licensed_pictures', :licensed_pictures => panel.licensed_pictures %>
6
+
@@ -0,0 +1,7 @@
1
+ <h1><%= t('.title') %></h1>
2
+ <p id="notice"><%= notice %></p>
3
+
4
+ <h2><%= t('home.index.catch') -%></h2>
5
+ <%= render 'panels/standard', :panel => @panel, :author => @author %>
6
+ <h2><%= t('speech_balloons.update_speech_balloon') -%></h2>
7
+ <%= render @speech_balloon.speech_balloon_template.engine_name + '/speech_balloons/form', :speech_balloon => @speech_balloon, :balloon => @balloon, :speech => @speech, :speech_balloon_extend => @speech_balloon_extend, :balloon_extend => @balloon_extend, :speech_balloon_extend => @speech_balloon_extend %>
@@ -0,0 +1,7 @@
1
+ <h1><%= t('.title') %></h1>
2
+ <p id="notice"><%= notice %></p>
3
+
4
+ <h2><%= t('home.index.catch') -%></h2>
5
+ <%= render 'panels/standard', :panel => @panel, :author => @author %>
6
+ <h2><%= t('speech_balloons.create_speech_balloon') -%></h2>
7
+ <%= render @speech_balloon.speech_balloon_template.engine_name + '/speech_balloons/form', :speech_balloon => @speech_balloon, :balloon => @balloon, :speech => @speech, :speech_balloon_extend => @speech_balloon_extend, :balloon_extend => @balloon_extend, :speech_balloon_extend => @speech_balloon_extend %>
@@ -0,0 +1,92 @@
1
+ <h1><%= t('.title') %></h1>
2
+ <p id="notice"><%= notice %></p>
3
+
4
+ <%= render 'speech_balloons/standard', :panel => @speech_balloon.panel, :author => @author, :spot => @speech_balloon %>
5
+
6
+ <p>
7
+ <b><%= t_m 'SpeechBalloon.caption' -%>:</b>
8
+ <%= h @speech_balloon.caption %>
9
+ </p>
10
+
11
+ <p>
12
+ <b><%= t_m 'SpeechBalloon.speech_balloon_template_id' -%>:</b>
13
+ <%= link_to h(@speech_balloon.speech_balloon_template.caption), @speech_balloon.speech_balloon_template %>
14
+ </p>
15
+
16
+ <p>
17
+ <b><%= t_m 'SpeechBalloon.classname' -%>:</b>
18
+ <%= @speech_balloon.classname %>
19
+ </p>
20
+
21
+ <p>
22
+ <b><%= t_m 'SpeechBalloon.z' -%>:</b>
23
+ <%= @speech_balloon.z %>
24
+ </p>
25
+
26
+ <p>
27
+ <b><%= t_m 'SpeechBalloon.t' -%>:</b>
28
+ <%= @speech_balloon.t %>
29
+ </p>
30
+
31
+ <p>
32
+ <b><%= t_m 'Balloon.x' -%>:</b>
33
+ <%= @speech_balloon.balloon.x %>
34
+ </p>
35
+
36
+ <p>
37
+ <b><%= t_m 'Balloon.y' -%>:</b>
38
+ <%= @speech_balloon.balloon.y %>
39
+ </p>
40
+
41
+ <p>
42
+ <b><%= t_m 'Balloon.width' -%>:</b>
43
+ <%= @speech_balloon.balloon.width %>
44
+ </p>
45
+
46
+ <p>
47
+ <b><%= t_m 'Balloon.height' -%>:</b>
48
+ <%= @speech_balloon.balloon.height %>
49
+ </p>
50
+
51
+ <p>
52
+ <b><%= t_m 'Balloon.r' -%>:</b>
53
+ <%= @speech_balloon.balloon.r %>
54
+ </p>
55
+
56
+ <p>
57
+ <b><%= t_m 'Speech.content' -%>:</b>
58
+ <%= @speech_balloon.speech.content %>
59
+ </p>
60
+
61
+ <p>
62
+ <b><%= t_m 'Speech.x' -%>:</b>
63
+ <%= @speech_balloon.speech.x %>
64
+ </p>
65
+
66
+ <p>
67
+ <b><%= t_m 'Speech.y' -%>:</b>
68
+ <%= @speech_balloon.speech.y %>
69
+ </p>
70
+
71
+ <p>
72
+ <b><%= t_m 'Speech.width' -%>:</b>
73
+ <%= @speech_balloon.speech.width %>
74
+ </p>
75
+
76
+ <p>
77
+ <b><%= t_m 'Speech.height' -%>:</b>
78
+ <%= @speech_balloon.speech.height %>
79
+ </p>
80
+
81
+ <p>
82
+ <b><%= t_m 'SpeechBalloon.created_at' -%>:</b>
83
+ <%= l @speech_balloon.created_at %>
84
+ </p>
85
+
86
+ <p>
87
+ <b><%= t_m 'SpeechBalloon.updated_at' -%>:</b>
88
+ <%= l @speech_balloon.updated_at %>
89
+ </p>
90
+
91
+ <%= link_to t('link.edit'), plain_speech_balloon.edit_speech_balloon_path(@speech_balloon) %>
92
+ <%= link_to t('link.destroy'), plain_speech_balloon.speech_balloon_path(@speech_balloon), :method => :delete %>
@@ -0,0 +1,16 @@
1
+
2
+ <div class="field">
3
+ <%= f.label :content %><br />
4
+ <%= f.number_field :content, :id => speech.field_tag_id(:content), :panel_id => speech.tag_panel_id, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :content, :tree => speech.field_tree(:content) %>
5
+ </div>
6
+
7
+ <%= f.hidden_field :x, :id => speech.field_tag_id(:x), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :x, :tree => speech.field_tree(:x) %>
8
+ <%= f.hidden_field :y, :id => speech.field_tag_id(:y), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :y, :tree => speech.field_tree(:y) %>
9
+ <%= f.hidden_field :width, :id => speech.field_tag_id(:width), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :width, :tree => speech.field_tree(:width) %>
10
+ <%= f.hidden_field :height, :id => speech.field_tag_id(:height), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :height, :tree => speech.field_tree(:height) %>
11
+ <%= f.hidden_field :settings, :id => speech.field_tag_id(:settings), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :settings, :tree => speech.field_tree(:settings) %>
12
+ <%= f.hidden_field :speech_balloon_id, :id => speech.field_tag_id(:speech_balloon_id), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :speech_balloon_id, :tree => speech.field_tree(:speech_balloon_id) %>
13
+
14
+ <% unless speech.new_record? %>
15
+ <%= f.hidden_field :id, :id => speech.field_tag_id(:id), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :column => :id, :tree => speech.field_tree(:id) %>
16
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>CircleSpeechBalloon</title>
5
+ <%= stylesheet_link_tag "circle_speech_balloon/application", :media => "all" %>
6
+ <%= javascript_include_tag "circle_speech_balloon/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ CircleSpeechBalloon::Engine.routes.draw do
2
+ end
@@ -0,0 +1,190 @@
1
+ {
2
+ "circle@pettan.com": {
3
+ "classname": "CircleSpeechBalloon",
4
+ "caption": "楕円",
5
+ "settings": {
6
+ "speech_balloon": {
7
+ "default_width": 200,
8
+ "default_height": 200,
9
+ "default_r": 140,
10
+ "r_step": 22.5
11
+ },
12
+ "0": {
13
+ "balloon": {
14
+ "system_picture_file": "r0.png"
15
+ },
16
+ "speech": {
17
+ "x_rate": 20,
18
+ "y_rate": 20,
19
+ "width_rate": 60,
20
+ "height_rate": 60
21
+ }
22
+ },
23
+ "1": {
24
+ "balloon": {
25
+ "system_picture_file": "r1.png"
26
+ },
27
+ "speech": {
28
+ "x_rate": 20,
29
+ "y_rate": 20,
30
+ "width_rate": 60,
31
+ "height_rate": 60
32
+ }
33
+ },
34
+ "2": {
35
+ "balloon": {
36
+ "system_picture_file": "r2.png"
37
+ },
38
+ "speech": {
39
+ "x_rate": 20,
40
+ "y_rate": 20,
41
+ "width_rate": 60,
42
+ "height_rate": 60
43
+ }
44
+ },
45
+ "3": {
46
+ "balloon": {
47
+ "system_picture_file": "r3.png"
48
+ },
49
+ "speech": {
50
+ "x_rate": 20,
51
+ "y_rate": 20,
52
+ "width_rate": 60,
53
+ "height_rate": 60
54
+ }
55
+ },
56
+ "4": {
57
+ "balloon": {
58
+ "system_picture_file": "r4.png"
59
+ },
60
+ "speech": {
61
+ "x_rate": 20,
62
+ "y_rate": 20,
63
+ "width_rate": 60,
64
+ "height_rate": 60
65
+ }
66
+ },
67
+ "5": {
68
+ "balloon": {
69
+ "system_picture_file": "r5.png"
70
+ },
71
+ "speech": {
72
+ "x_rate": 20,
73
+ "y_rate": 20,
74
+ "width_rate": 60,
75
+ "height_rate": 60
76
+ }
77
+ },
78
+ "6": {
79
+ "balloon": {
80
+ "system_picture_file": "r6.png"
81
+ },
82
+ "speech": {
83
+ "x_rate": 20,
84
+ "y_rate": 20,
85
+ "width_rate": 60,
86
+ "height_rate": 60
87
+ }
88
+ },
89
+ "7": {
90
+ "balloon": {
91
+ "system_picture_file": "r7.png"
92
+ },
93
+ "speech": {
94
+ "x_rate": 20,
95
+ "y_rate": 20,
96
+ "width_rate": 60,
97
+ "height_rate": 60
98
+ }
99
+ },
100
+ "8": {
101
+ "balloon": {
102
+ "system_picture_file": "r8.png"
103
+ },
104
+ "speech": {
105
+ "x_rate": 20,
106
+ "y_rate": 20,
107
+ "width_rate": 60,
108
+ "height_rate": 60
109
+ }
110
+ },
111
+ "9": {
112
+ "balloon": {
113
+ "system_picture_file": "r9.png"
114
+ },
115
+ "speech": {
116
+ "x_rate": 20,
117
+ "y_rate": 20,
118
+ "width_rate": 60,
119
+ "height_rate": 60
120
+ }
121
+ },
122
+ "10": {
123
+ "balloon": {
124
+ "system_picture_file": "r10.png"
125
+ },
126
+ "speech": {
127
+ "x_rate": 20,
128
+ "y_rate": 20,
129
+ "width_rate": 60,
130
+ "height_rate": 60
131
+ }
132
+ },
133
+ "11": {
134
+ "balloon": {
135
+ "system_picture_file": "r11.png"
136
+ },
137
+ "speech": {
138
+ "x_rate": 20,
139
+ "y_rate": 20,
140
+ "width_rate": 60,
141
+ "height_rate": 60
142
+ }
143
+ },
144
+ "12": {
145
+ "balloon": {
146
+ "system_picture_file": "r12.png"
147
+ },
148
+ "speech": {
149
+ "x_rate": 20,
150
+ "y_rate": 20,
151
+ "width_rate": 60,
152
+ "height_rate": 60
153
+ }
154
+ },
155
+ "13": {
156
+ "balloon": {
157
+ "system_picture_file": "r13.png"
158
+ },
159
+ "speech": {
160
+ "x_rate": 20,
161
+ "y_rate": 20,
162
+ "width_rate": 60,
163
+ "height_rate": 60
164
+ }
165
+ },
166
+ "14": {
167
+ "balloon": {
168
+ "system_picture_file": "r14.png"
169
+ },
170
+ "speech": {
171
+ "x_rate": 20,
172
+ "y_rate": 20,
173
+ "width_rate": 60,
174
+ "height_rate": 60
175
+ }
176
+ },
177
+ "15": {
178
+ "balloon": {
179
+ "system_picture_file": "r15.png"
180
+ },
181
+ "speech": {
182
+ "x_rate": 20,
183
+ "y_rate": 20,
184
+ "width_rate": 60,
185
+ "height_rate": 60
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }