OSDN Git Service

t#31896:form conf
[pettanr/pettanr.git] / app / helpers / application_helper.rb
1 module ApplicationHelper
2   def full_url filename
3     request.protocol + request.host_with_port + filename
4   end
5   
6   def t_m(label)
7     l = label.split('.')
8     if l.size > 2
9       label
10     else
11       if l.size == 1
12         label.constantize.model_name.human
13       else
14         l.first.constantize.human_attribute_name(l.last)
15       end
16     end
17   end
18   
19   def t_select_items(items)
20     items.map {|i| [t(i[0]), i[1]] }
21   end
22   
23   def t_selected_item(name, index)
24     t(MagicNumber[name][index][0])
25   end
26   
27   def icon_tag name, opt = {}
28     title = opt[:object] ? (name.to_s + ' ID:' + opt[:object].id.to_s) : name
29     size = opt[:size] ? opt[:size].to_i : 35
30     tag :img, :src => asset_path(name.to_s.downcase + '.gif'), :width => size, :height => size, :alt => name.to_s + ' Icon', :title => title
31   end
32   
33   def author_icon opt = {}
34     icon_tag :Author, opt
35   end
36   
37   def artist_icon opt = {}
38     icon_tag :Artist, opt
39   end
40   
41   def comic_icon opt = {}
42     icon_tag :Comic, opt
43   end
44   
45   def story_icon opt = {}
46     icon_tag :Story, opt
47   end
48   
49   def panel_icon opt = {}
50     icon_tag :Panel, opt
51   end
52   
53   def panel_editor_javascript_include_tags
54     WritingFormat.enable_list().map {|wf|
55 #      javascript_include_tag wf.engine_name
56       javascript_include_tag wf.engine_name + "/application"
57     }.join("\n") + 
58     SpeechBalloonTemplate.enable_list().map {|sbt|
59       stylesheet_link_tag sbt.engine_name + "/application"
60     }.join("\n") + 
61     SpeechBalloonTemplate.enable_list().map {|sbt|
62       javascript_include_tag sbt.engine_name + "/application"
63     }.join("\n")
64   end
65   
66   def configurations
67     JSON.parse(<<HD
68 {
69     "models": {
70         "PanelPicture": "panel_picture",
71         "panel_picture": {
72             "class_name": "PanelPicture",
73             "table_name": "panel_pictures",
74             "attributes": {
75                 "id": {
76                     "type": "number",
77                     "primary_key": 1
78                 },
79                 "panel_id": {
80                     "type": "number"
81                 },
82                 "picture_id": {
83                     "type": "number"
84                 },
85                 "caption": {
86                     "type": "text"
87                 },
88                 "x": {
89                     "type": "number"
90                 },
91                 "y": {
92                     "type": "number"
93                 },
94                 "width": {
95                     "type": "number"
96                 },
97                 "height": {
98                     "type": "number"
99                 },
100                 "link": {
101                     "type": "text"
102                 },
103                 "z": {
104                     "type": "number"
105                 },
106                 "t": {
107                     "type": "number"
108                 },
109                 "created_at": {
110                     "type": "datetime"
111                 },
112                 "updated_at": {
113                     "type": "datetime"
114                 }
115             }
116         },
117         "SpeechBalloon": "speech_balloon",
118         "speech_balloon": {
119             "class_name": "SpeechBalloon",
120             "table_name": "speech_balloons",
121             "extend": "classname",
122             "attributes": {
123                 "id": {
124                     "type": "number",
125                     "primary_key": 1
126                 },
127                 "panel_id": {
128                     "type": "number"
129                 },
130                 "speech_balloon_template_id": {
131                     "type": "number"
132                 },
133                 "classname": {
134                     "type": "text"
135                 },
136                 "z": {
137                     "type": "number"
138                 },
139                 "t": {
140                     "type": "number"
141                 },
142                 "settings": {
143                     "type": "text"
144                 },
145                 "caption": {
146                     "type": "text"
147                 },
148                 "created_at": {
149                     "type": "datetime"
150                 },
151                 "updated_at": {
152                     "type": "datetime"
153                 }
154             }
155         },
156         "Balloon": "balloon",
157         "balloon": {
158             "class_name": "Balloon",
159             "table_name": "balloons",
160             "attributes": {
161                 "id": {
162                     "type": "number",
163                     "primary_key": 1
164                 },
165                 "speech_balloon_id": {
166                     "type": "number"
167                 },
168                 "system_picture_id": {
169                     "type": "number"
170                 },
171                 "x": {
172                     "type": "number"
173                 },
174                 "y": {
175                     "type": "number"
176                 },
177                 "width": {
178                     "type": "number"
179                 },
180                 "height": {
181                     "type": "number"
182                 },
183                 "r": {
184                     "type": "number"
185                 },
186                 "settings": {
187                     "type": "text"
188                 },
189                 "created_at": {
190                     "type": "datetime"
191                 },
192                 "updated_at": {
193                     "type": "datetime"
194                 }
195             }
196         },
197         "Speech": "speech",
198         "speech": {
199             "class_name": "Speech",
200             "table_name": "speeches",
201             "attributes": {
202                 "id": {
203                     "type": "number",
204                     "primary_key": 1
205                 },
206                 "speech_balloon_id": {
207                     "type": "number"
208                 },
209                 "writing_format_id": {
210                     "type": "number"
211                 },
212                 "content": {
213                     "type": "text"
214                 },
215                 "font_size": {
216                     "type": "float"
217                 },
218                 "text_align": {
219                     "type": "number"
220                 },
221                 "fore_color": {
222                     "type": "number"
223                 },
224                 "x": {
225                     "type": "number"
226                 },
227                 "y": {
228                     "type": "number"
229                 },
230                 "width": {
231                     "type": "number"
232                 },
233                 "height": {
234                     "type": "number"
235                 },
236                 "quotes": {
237                     "type": "text"
238                 },
239                 "settings": {
240                     "type": "text"
241                 },
242                 "created_at": {
243                     "type": "datetime"
244                 },
245                 "updated_at": {
246                     "type": "datetime"
247                 }
248             }
249         },
250         "GroundPicture": "ground_picture",
251         "ground_picture": {
252             "class_name": "GroundPicture",
253             "table_name": "ground_pictures",
254             "attributes": {
255                 "id": {
256                     "type": "number",
257                     "primary_key": 1
258                 },
259                 "panel_id": {
260                     "type": "number"
261                 },
262                 "picture_id": {
263                     "type": "number"
264                 },
265                 "caption": {
266                     "type": "text"
267                 },
268                 "repeat": {
269                     "type": "number"
270                 },
271                 "x": {
272                     "type": "number"
273                 },
274                 "y": {
275                     "type": "number"
276                 },
277                 "z": {
278                     "type": "number"
279                 },
280                 "t": {
281                     "type": "number"
282                 },
283                 "created_at": {
284                     "type": "datetime"
285                 },
286                 "updated_at": {
287                     "type": "datetime"
288                 }
289             }
290         },
291         "GroundColor": "ground_color",
292         "ground_color": {
293             "class_name": "GroundColor",
294             "table_name": "ground_colors",
295             "attributes": {
296                 "id": {
297                     "type": "number",
298                     "primary_key": 1
299                 },
300                 "panel_id": {
301                     "type": "number"
302                 },
303                 "caption": {
304                     "type": "text"
305                 },
306                 "code": {
307                     "type": "number"
308                 },
309                 "z": {
310                     "type": "number"
311                 },
312                 "t": {
313                     "type": "number"
314                 },
315                 "created_at": {
316                     "type": "datetime"
317                 },
318                 "updated_at": {
319                     "type": "datetime"
320                 }
321             }
322         },
323         "WritingFormat": "writing_format",
324         "writing_format": {
325             "class_name": "WritingFormat",
326             "table_name": "writing_formats",
327             "attributes": {
328                 "id": {
329                     "type": "number",
330                     "primary_key": 1
331                 },
332                 "name": {
333                     "type": "text"
334                 },
335                 "classname": {
336                     "type": "text"
337                 },
338                 "caption": {
339                     "type": "text"
340                 },
341                 "system_picture_id": {
342                     "type": "number"
343                 },
344                 "settings": {
345                     "type": "text"
346                 },
347                 "created_at": {
348                     "type": "datetime"
349                 },
350                 "updated_at": {
351                     "type": "datetime"
352                 }
353             }
354         }
355     },
356     "elements": [
357         {
358             "name": "panel_picture",
359             "path_name": "panel_pictures",
360             "parts": []
361         },
362         {
363             "name": "speech_balloon",
364             "path_name": "circle_speech_balloon/speech_balloons",
365             "parts": [
366                 "balloon",
367                 "speech"
368             ]
369         },
370         {
371             "name": "ground_picture",
372             "path_name": "ground_pictures",
373             "parts": []
374         },
375         {
376             "name": "ground_color",
377             "path_name": "ground_colors",
378             "parts": []
379         }
380     ],
381     "forms": {
382         "PanelPicture": "panel_picture",
383         "panel_picture": {
384             "fields": [
385                 {
386                     "column": "caption",
387                     "type": "text",
388                     "options": {
389                         "label_break": false,
390                         "row_break": true
391                     }
392                 },
393                 {
394                     "column": "x",
395                     "type": "number",
396                     "options": {
397                         "size": 5
398                     }
399                 },
400                 {
401                     "column": "y",
402                     "type": "number",
403                     "options": {
404                         "size": 5,
405                         "row_break": true
406                     }
407                 },
408                 {
409                     "column": "width",
410                     "type": "number",
411                     "options": {
412                         "size": 5,
413                         "row_break": true
414                     },
415                     "helpers": {
416                         "size": {
417                             "path": "panels/size_helper",
418                             "options": {
419                                 "class": "panel_picture_width_tool"
420                             }
421                         }
422                     }
423                 },
424                 {
425                     "column": "height",
426                     "type": "number",
427                     "options": {
428                         "size": 5,
429                         "row_break": true
430                     },
431                     "helpers": {
432                         "size": {
433                             "path": "panels/size_helper",
434                             "options": {
435                                 "class": "panel_picture_height_tool"
436                             }
437                         }
438                     }
439                 },
440                 {
441                     "column": "link",
442                     "type": "text",
443                     "options": {
444                         "row_break": true
445                     }
446                 },
447                 {
448                     "column": "id",
449                     "type": "hidden",
450                     "options": {}
451                 },
452                 {
453                     "column": "panel_id",
454                     "type": "hidden",
455                     "options": {}
456                 },
457                 {
458                     "column": "picture_id",
459                     "type": "hidden",
460                     "options": {}
461                 },
462                 {
463                     "column": "z",
464                     "type": "hidden",
465                     "options": {}
466                 },
467                 {
468                     "column": "t",
469                     "type": "hidden",
470                     "options": {}
471                 }
472             ]
473         },
474         "CircleSpeechBalloon": "circle_speech_balloon",
475         "circle_speech_balloon": {
476             "base": "speech_balloon",
477             "fields": [
478                 {
479                     "column": "caption",
480                     "type": "text",
481                     "options": {
482                         "row_break": true
483                     }
484                 },
485                 {
486                     "part": "balloon",
487                     "column": "r",
488                     "type": "number",
489                     "options": {
490                         "size": 5,
491                         "row_break": true
492                     },
493                     "helpers": {
494                         "tail_angle": {
495                             "path": "panels/tail_angle_helper",
496                             "options": {}
497                         }
498                     }
499                 },
500                 {
501                     "part": "balloon",
502                     "column": "x",
503                     "type": "number",
504                     "options": {
505                         "size": 5
506                     }
507                 },
508                 {
509                     "part": "balloon",
510                     "column": "y",
511                     "type": "number",
512                     "options": {
513                         "size": 5,
514                         "row_break": true
515                     }
516                 },
517                 {
518                     "part": "balloon",
519                     "column": "width",
520                     "type": "number",
521                     "options": {
522                         "size": 5
523                     }
524                 },
525                 {
526                     "part": "balloon",
527                     "column": "height",
528                     "type": "number",
529                     "options": {
530                         "size": 5,
531                         "row_break": true
532                     }
533                 },
534                 {
535                     "part": "balloon",
536                     "column": "id",
537                     "type": "hidden",
538                     "options": {}
539                 },
540                 {
541                     "part": "balloon",
542                     "column": "speech_balloon_id",
543                     "type": "hidden",
544                     "options": {}
545                 },
546                 {
547                     "part": "balloon",
548                     "column": "system_picture_id",
549                     "type": "hidden",
550                     "options": {}
551                 },
552                 {
553                     "part": "balloon",
554                     "column": "settings",
555                     "type": "hidden",
556                     "options": {}
557                 },
558                 {
559                     "part": "speech",
560                     "column": "writing_format_id",
561                     "type": "select",
562                     "options": {
563                         "source": "model",
564                         "model": "writing_format",
565                         "method": "enable_list",
566                         "caption": "caption"
567                     }
568                 },
569                 {
570                     "part": "speech",
571                     "column": "font_size",
572                     "type": "select",
573                     "options": {
574                         "source": "magic_number",
575                         "key": "speech_font_size_items",
576                         "row_break": true
577                     }
578                 },
579                 {
580                     "part": "speech",
581                     "column": "text_align",
582                     "type": "select",
583                     "options": {
584                         "source": "magic_number",
585                         "key": "speech_text_align_items"
586                     }
587                 },
588                 {
589                     "part": "speech",
590                     "column": "quotes",
591                     "type": "text",
592                     "options": {
593                         "size": 5
594                     }
595                 },
596                 {
597                     "part": "speech",
598                     "column": "content",
599                     "type": "text_area",
600                     "options": {
601                         "label_break": true,
602                         "size": "45x5"
603                     }
604                 },
605                 {
606                     "part": "speech",
607                     "column": "fore_color",
608                     "type": "hidden",
609                     "options": {
610                         "label_break": true
611                     },
612                     "helpers": {
613                         "color": {
614                             "path": "panels/color_helper",
615                             "options": {},
616                             "wrapper": "speech-fore_color-wrap"
617                         }
618                     }
619                 },
620                 {
621                     "part": "speech",
622                     "column": "id",
623                     "type": "hidden",
624                     "options": {}
625                 },
626                 {
627                     "part": "speech",
628                     "column": "speech_balloon_id",
629                     "type": "hidden",
630                     "options": {}
631                 },
632                 {
633                     "part": "speech",
634                     "column": "x",
635                     "type": "hidden",
636                     "options": {}
637                 },
638                 {
639                     "part": "speech",
640                     "column": "y",
641                     "type": "hidden",
642                     "options": {}
643                 },
644                 {
645                     "part": "speech",
646                     "column": "width",
647                     "type": "hidden",
648                     "options": {}
649                 },
650                 {
651                     "part": "speech",
652                     "column": "height",
653                     "type": "hidden",
654                     "options": {}
655                 },
656                 {
657                     "part": "speech",
658                     "column": "settings",
659                     "type": "hidden",
660                     "options": {}
661                 },
662                 {
663                     "column": "id",
664                     "type": "hidden",
665                     "options": {}
666                 },
667                 {
668                     "column": "panel_id",
669                     "type": "hidden",
670                     "options": {}
671                 },
672                 {
673                     "column": "speech_balloon_template_id",
674                     "type": "hidden",
675                     "options": {}
676                 },
677                 {
678                     "column": "classname",
679                     "type": "hidden",
680                     "options": {}
681                 },
682                 {
683                     "column": "z",
684                     "type": "hidden",
685                     "options": {}
686                 },
687                 {
688                     "column": "t",
689                     "type": "hidden",
690                     "options": {}
691                 },
692                 {
693                     "column": "settings",
694                     "type": "hidden",
695                     "options": {}
696                 }
697             ]
698         },
699         "PlainSpeechBalloon": "plain_speech_balloon",
700         "plain_speech_balloon": {
701             "base": "speech_balloon",
702             "fields": [
703                 {
704                     "column": "caption",
705                     "type": "text",
706                     "options": {
707                         "row_break": true
708                     }
709                 },
710                 {
711                     "part": "balloon",
712                     "column": "r",
713                     "type": "hidden",
714                     "options": {}
715                 },
716                 {
717                     "part": "balloon",
718                     "column": "x",
719                     "type": "number",
720                     "options": {
721                         "size": 5
722                     }
723                 },
724                 {
725                     "part": "balloon",
726                     "column": "y",
727                     "type": "number",
728                     "options": {
729                         "size": 5,
730                         "row_break": true
731                     }
732                 },
733                 {
734                     "part": "balloon",
735                     "column": "width",
736                     "type": "number",
737                     "options": {
738                         "size": 5
739                     }
740                 },
741                 {
742                     "part": "balloon",
743                     "column": "height",
744                     "type": "number",
745                     "options": {
746                         "size": 5,
747                         "row_break": true
748                     }
749                 },
750                 {
751                     "part": "balloon",
752                     "column": "id",
753                     "type": "hidden",
754                     "options": {}
755                 },
756                 {
757                     "part": "balloon",
758                     "column": "speech_balloon_id",
759                     "type": "hidden",
760                     "options": {}
761                 },
762                 {
763                     "part": "balloon",
764                     "column": "system_picture_id",
765                     "type": "hidden",
766                     "options": {}
767                 },
768                 {
769                     "part": "balloon",
770                     "column": "settings",
771                     "type": "hidden",
772                     "options": {}
773                 },
774                 {
775                     "part": "speech",
776                     "column": "writing_format_id",
777                     "type": "select",
778                     "options": {
779                         "source": "model",
780                         "model": "writing_format",
781                         "method": "enable_list",
782                         "caption": "caption"
783                     }
784                 },
785                 {
786                     "part": "speech",
787                     "column": "font_size",
788                     "type": "select",
789                     "options": {
790                         "source": "magic_number",
791                         "key": "speech_font_size_items",
792                         "row_break": true
793                     }
794                 },
795                 {
796                     "part": "speech",
797                     "column": "text_align",
798                     "type": "select",
799                     "options": {
800                         "source": "magic_number",
801                         "key": "speech_text_align_items"
802                     }
803                 },
804                 {
805                     "part": "speech",
806                     "column": "quotes",
807                     "type": "text",
808                     "options": {
809                         "size": 5
810                     }
811                 },
812                 {
813                     "part": "speech",
814                     "column": "content",
815                     "type": "text_area",
816                     "options": {
817                         "label_break": true,
818                         "size": "45x5"
819                     }
820                 },
821                 {
822                     "part": "speech",
823                     "column": "fore_color",
824                     "type": "hidden",
825                     "options": {
826                         "label_break": true
827                     },
828                     "helpers": {
829                         "color": {
830                             "path": "panels/color_helper",
831                             "options": {},
832                             "wrapper": "speech-fore_color-wrap"
833                         }
834                     }
835                 },
836                 {
837                     "part": "speech",
838                     "column": "id",
839                     "type": "hidden",
840                     "options": {}
841                 },
842                 {
843                     "part": "speech",
844                     "column": "speech_balloon_id",
845                     "type": "hidden",
846                     "options": {}
847                 },
848                 {
849                     "part": "speech",
850                     "column": "x",
851                     "type": "hidden",
852                     "options": {}
853                 },
854                 {
855                     "part": "speech",
856                     "column": "y",
857                     "type": "hidden",
858                     "options": {}
859                 },
860                 {
861                     "part": "speech",
862                     "column": "width",
863                     "type": "hidden",
864                     "options": {}
865                 },
866                 {
867                     "part": "speech",
868                     "column": "height",
869                     "type": "hidden",
870                     "options": {}
871                 },
872                 {
873                     "part": "speech",
874                     "column": "settings",
875                     "type": "hidden",
876                     "options": {}
877                 },
878                 {
879                     "column": "id",
880                     "type": "hidden",
881                     "options": {}
882                 },
883                 {
884                     "column": "panel_id",
885                     "type": "hidden",
886                     "options": {}
887                 },
888                 {
889                     "column": "speech_balloon_template_id",
890                     "type": "hidden",
891                     "options": {}
892                 },
893                 {
894                     "column": "classname",
895                     "type": "hidden",
896                     "options": {}
897                 },
898                 {
899                     "column": "z",
900                     "type": "hidden",
901                     "options": {}
902                 },
903                 {
904                     "column": "t",
905                     "type": "hidden",
906                     "options": {}
907                 },
908                 {
909                     "column": "settings",
910                     "type": "hidden",
911                     "options": {}
912                 }
913             ]
914         },
915         "SquareSpeechBalloon": "square_speech_balloon",
916         "square_speech_balloon": {
917             "base": "speech_balloon",
918             "fields": [
919                 {
920                     "column": "caption",
921                     "type": "text",
922                     "options": {
923                         "row_break": true
924                     }
925                 },
926                 {
927                     "part": "balloon",
928                     "column": "r",
929                     "type": "hidden",
930                     "options": {}
931                 },
932                 {
933                     "part": "balloon",
934                     "column": "x",
935                     "type": "number",
936                     "options": {
937                         "size": 5
938                     }
939                 },
940                 {
941                     "part": "balloon",
942                     "column": "y",
943                     "type": "number",
944                     "options": {
945                         "size": 5,
946                         "row_break": true
947                     }
948                 },
949                 {
950                     "part": "balloon",
951                     "column": "width",
952                     "type": "number",
953                     "options": {
954                         "size": 5
955                     }
956                 },
957                 {
958                     "part": "balloon",
959                     "column": "height",
960                     "type": "number",
961                     "options": {
962                         "size": 5,
963                         "row_break": true
964                     }
965                 },
966                 {
967                     "part": "balloon",
968                     "column": "id",
969                     "type": "hidden",
970                     "options": {}
971                 },
972                 {
973                     "part": "balloon",
974                     "column": "speech_balloon_id",
975                     "type": "hidden",
976                     "options": {}
977                 },
978                 {
979                     "part": "balloon",
980                     "column": "system_picture_id",
981                     "type": "hidden",
982                     "options": {}
983                 },
984                 {
985                     "part": "balloon",
986                     "column": "settings",
987                     "type": "hidden",
988                     "options": {}
989                 },
990                 {
991                     "part": "speech",
992                     "column": "writing_format_id",
993                     "type": "select",
994                     "options": {
995                         "source": "model",
996                         "model": "writing_format",
997                         "method": "enable_list",
998                         "caption": "caption"
999                     }
1000                 },
1001                 {
1002                     "part": "speech",
1003                     "column": "font_size",
1004                     "type": "select",
1005                     "options": {
1006                         "source": "magic_number",
1007                         "key": "speech_font_size_items",
1008                         "row_break": true
1009                     }
1010                 },
1011                 {
1012                     "part": "speech",
1013                     "column": "text_align",
1014                     "type": "select",
1015                     "options": {
1016                         "source": "magic_number",
1017                         "key": "speech_text_align_items"
1018                     }
1019                 },
1020                 {
1021                     "part": "speech",
1022                     "column": "quotes",
1023                     "type": "text",
1024                     "options": {
1025                         "size": 5
1026                     }
1027                 },
1028                 {
1029                     "part": "speech",
1030                     "column": "content",
1031                     "type": "text_area",
1032                     "options": {
1033                         "label_break": true,
1034                         "size": "45x5"
1035                     }
1036                 },
1037                 {
1038                     "part": "speech",
1039                     "column": "fore_color",
1040                     "type": "hidden",
1041                     "options": {
1042                         "label_break": true
1043                     },
1044                     "helpers": {
1045                         "color": {
1046                             "path": "panels/color_helper",
1047                             "options": {},
1048                             "wrapper": "speech-fore_color-wrap"
1049                         }
1050                     }
1051                 },
1052                 {
1053                     "part": "speech",
1054                     "column": "id",
1055                     "type": "hidden",
1056                     "options": {}
1057                 },
1058                 {
1059                     "part": "speech",
1060                     "column": "speech_balloon_id",
1061                     "type": "hidden",
1062                     "options": {}
1063                 },
1064                 {
1065                     "part": "speech",
1066                     "column": "x",
1067                     "type": "hidden",
1068                     "options": {}
1069                 },
1070                 {
1071                     "part": "speech",
1072                     "column": "y",
1073                     "type": "hidden",
1074                     "options": {}
1075                 },
1076                 {
1077                     "part": "speech",
1078                     "column": "width",
1079                     "type": "hidden",
1080                     "options": {}
1081                 },
1082                 {
1083                     "part": "speech",
1084                     "column": "height",
1085                     "type": "hidden",
1086                     "options": {}
1087                 },
1088                 {
1089                     "part": "speech",
1090                     "column": "settings",
1091                     "type": "hidden",
1092                     "options": {}
1093                 },
1094                 {
1095                     "column": "id",
1096                     "type": "hidden",
1097                     "options": {}
1098                 },
1099                 {
1100                     "column": "panel_id",
1101                     "type": "hidden",
1102                     "options": {}
1103                 },
1104                 {
1105                     "column": "speech_balloon_template_id",
1106                     "type": "hidden",
1107                     "options": {}
1108                 },
1109                 {
1110                     "column": "classname",
1111                     "type": "hidden",
1112                     "options": {}
1113                 },
1114                 {
1115                     "column": "z",
1116                     "type": "hidden",
1117                     "options": {}
1118                 },
1119                 {
1120                     "column": "t",
1121                     "type": "hidden",
1122                     "options": {}
1123                 },
1124                 {
1125                     "column": "settings",
1126                     "type": "hidden",
1127                     "options": {}
1128                 }
1129             ]
1130         },
1131         "GroundPicture": "ground_picture",
1132         "ground_picture": {
1133             "fields": [
1134                 {
1135                     "column": "caption",
1136                     "type": "text",
1137                     "options": {
1138                         "row_break": true
1139                     }
1140                 },
1141                 {
1142                     "column": "repeat",
1143                     "type": "select",
1144                     "options": {
1145                         "source": "magic_number",
1146                         "key": "ground_picture_repeat_items",
1147                         "row_break": true
1148                     }
1149                 },
1150                 {
1151                     "column": "x",
1152                     "type": "number",
1153                     "options": {
1154                         "size": 5
1155                     }
1156                 },
1157                 {
1158                     "column": "y",
1159                     "type": "number",
1160                     "options": {
1161                         "size": 5,
1162                         "row_break": true
1163                     }
1164                 },
1165                 {
1166                     "column": "z",
1167                     "type": "hidden",
1168                     "options": {}
1169                 },
1170                 {
1171                     "column": "t",
1172                     "type": "hidden",
1173                     "options": {}
1174                 },
1175                 {
1176                     "column": "id",
1177                     "type": "hidden",
1178                     "options": {}
1179                 },
1180                 {
1181                     "column": "panel_id",
1182                     "type": "hidden",
1183                     "options": {}
1184                 },
1185                 {
1186                     "column": "picture_id",
1187                     "type": "hidden",
1188                     "options": {}
1189                 }
1190             ]
1191         },
1192         "GroundColor": "ground_color",
1193         "ground_color": {
1194             "fields": [
1195                 {
1196                     "column": "caption",
1197                     "type": "text",
1198                     "options": {
1199                         "row_break": true
1200                     }
1201                 },
1202                 {
1203                     "column": "code",
1204                     "type": "hidden",
1205                     "options": {
1206                         "label_break": true,
1207                         "row_break": true
1208                     },
1209                     "helpers": {
1210                         "color": {
1211                             "path": "panels/color_helper",
1212                             "options": {},
1213                             "wrapper": "ground_color-code-wrap"
1214                         }
1215                     }
1216                 },
1217                 {
1218                     "column": "z",
1219                     "type": "hidden",
1220                     "options": {}
1221                 },
1222                 {
1223                     "column": "t",
1224                     "type": "hidden",
1225                     "options": {}
1226                 },
1227                 {
1228                     "column": "id",
1229                     "type": "hidden",
1230                     "options": {}
1231                 },
1232                 {
1233                     "column": "panel_id",
1234                     "type": "hidden",
1235                     "options": {}
1236                 }
1237             ]
1238         }
1239     },
1240     "locales": {
1241         "ja": {}
1242     }
1243 }
1244 HD
1245 )
1246   end
1247 end