From c75552d8db3397821ffc4913bc9e465f6141b5c5 Mon Sep 17 00:00:00 2001 From: yasushiito Date: Wed, 19 Feb 2014 17:43:37 +0900 Subject: [PATCH] fix form --- .../manifest/work/controllers.js.coffee.erb | 57 ++ .../javascripts/manifest/work/forms.js.coffee.erb | 549 +++++++++++++- app/controllers/application_controller.rb | 23 +- app/controllers/artists_controller.rb | 23 +- app/controllers/authors_controller.rb | 15 +- app/controllers/comics_controller.rb | 18 +- app/controllers/scroll_panels_controller.rb | 18 +- app/controllers/scrolls_controller.rb | 55 +- app/controllers/sheet_panels_controller.rb | 18 +- app/controllers/sheets_controller.rb | 18 +- app/controllers/stories_controller.rb | 18 +- app/controllers/story_sheets_controller.rb | 18 +- app/models/comic.rb | 5 + app/models/scroll_panel.rb | 5 + app/models/sheet_panel.rb | 2 +- app/models/story.rb | 5 + app/models/story_sheet.rb | 5 + app/views/templates/r/form/_form.html.erb | 4 +- app/views/templates/r/form/submit/_none.html.erb | 0 app/views/templates/r/form/submit/_submit.html.erb | 3 + config/locales/pettanr.ja.yml | 195 ++--- lib/manifest/controller/action.rb | 4 +- lib/manifest/controller/action/edit.rb | 18 + lib/manifest/local/view/form.rb | 25 +- lib/peta/item.rb | 4 + public/manifest.json | 826 ++++++++++++++++++--- 26 files changed, 1507 insertions(+), 424 deletions(-) create mode 100644 app/views/templates/r/form/submit/_none.html.erb create mode 100644 app/views/templates/r/form/submit/_submit.html.erb create mode 100644 lib/manifest/controller/action/edit.rb diff --git a/app/assets/javascripts/manifest/work/controllers.js.coffee.erb b/app/assets/javascripts/manifest/work/controllers.js.coffee.erb index 3eaf78c2..5a7db077 100644 --- a/app/assets/javascripts/manifest/work/controllers.js.coffee.erb +++ b/app/assets/javascripts/manifest/work/controllers.js.coffee.erb @@ -39,6 +39,9 @@ new: { type: 'new', }, + edit: { + type: 'edit', + }, }, }, scroll_panels: { @@ -68,6 +71,12 @@ count_by_scroll: { type: 'count', }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, comics: { @@ -91,6 +100,12 @@ count_by_author: { type: 'count', }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, stories: { @@ -132,6 +147,12 @@ count_by_author: { type: 'count', }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, story_sheets: { @@ -161,6 +182,12 @@ count_by_sheet: { type: 'count', }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, sheets: { @@ -202,6 +229,12 @@ count_by_author: { type: 'count', }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, sheet_panels: { @@ -231,6 +264,12 @@ count_by_panel: { type: 'count', }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, panels: { @@ -272,6 +311,12 @@ count_by_speech_balloon_template: { type: 'count', }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, panel_pictures: { @@ -639,6 +684,12 @@ list_name: 'public_list', }, }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, artists: { @@ -662,6 +713,12 @@ list_name: 'public_list', }, }, + new: { + type: 'new', + }, + edit: { + type: 'edit', + }, }, }, system_pictures: { diff --git a/app/assets/javascripts/manifest/work/forms.js.coffee.erb b/app/assets/javascripts/manifest/work/forms.js.coffee.erb index 52793ee8..91a3227f 100644 --- a/app/assets/javascripts/manifest/work/forms.js.coffee.erb +++ b/app/assets/javascripts/manifest/work/forms.js.coffee.erb @@ -29,6 +29,9 @@ args: { column: 'title', label: { + args: { + row_break: true, + }, }, tag: { type: 'text', @@ -40,12 +43,15 @@ args: { column: 'description', label: { + args: { + row_break: true, + }, }, tag: { type: 'text_area', args: { options: { - size: 5, + size: '45x15', }, }, }, @@ -93,6 +99,473 @@ 'author_id', ] }, + scroll_panel: { + fields: { + scroll_id: { + args: { + column: 'scroll_id', + label: { + }, + tag: { + type: 'number', + }, + }, + }, + panel_id: { + args: { + column: 'panel_id', + label: { + }, + tag: { + type: 'number', + }, + }, + }, + t: { + args: { + column: 't', + label: { + }, + tag: { + type: 'number', + }, + }, + }, + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + }, + field_names: [ + 'scroll_id', + 'panel_id', + 't', + 'id', + ] + }, + comic: { + fields: { + title: { + args: { + column: 'title', + label: { + args: { + row_break: true, + }, + }, + tag: { + type: 'text', + }, + row_break: true, + }, + }, + description: { + args: { + column: 'description', + label: { + args: { + row_break: true, + }, + }, + tag: { + type: 'text_area', + args: { + options: { + size: '45x15', + }, + }, + }, + }, + }, + visible: { + args: { + column: 'visible', + label: { + }, + tag: { + type: 'select', + }, + row_break: true, + }, + }, + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + author_id: { + args: { + column: 'author_id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + }, + field_names: [ + 'title', + 'description', + 'visible', + 'id', + 'author_id', + ] + }, + story: { + fields: { + comic_id: { + args: { + column: 'comic_id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + title: { + args: { + column: 'title', + label: { + args: { + row_break: true, + }, + }, + tag: { + type: 'text', + }, + row_break: true, + }, + }, + description: { + args: { + column: 'description', + label: { + args: { + row_break: true, + }, + }, + tag: { + type: 'text_area', + args: { + options: { + size: '45x15', + }, + }, + }, + row_break: true, + }, + }, + visible: { + args: { + column: 'visible', + label: { + }, + tag: { + type: 'select', + }, + row_break: true, + }, + }, + t: { + args: { + column: 't', + label: { + }, + tag: { + type: 'number', + }, + }, + }, + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + author_id: { + args: { + column: 'author_id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + }, + field_names: [ + 'comic_id', + 'title', + 'description', + 'visible', + 't', + 'id', + 'author_id', + ] + }, + story_sheet: { + fields: { + story_id: { + args: { + column: 'story_id', + label: { + type: 'none', + }, + tag: { + type: 'number', + }, + }, + }, + sheet_id: { + args: { + column: 'sheet_id', + label: { + type: 'none', + }, + tag: { + type: 'number', + }, + }, + }, + t: { + args: { + column: 't', + label: { + }, + tag: { + type: 'number', + }, + }, + }, + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + }, + field_names: [ + 'story_id', + 'sheet_id', + 't', + 'id', + ] + }, + sheet: { + fields: { + caption: { + args: { + column: 'caption', + label: { + args: { + row_break: true, + }, + }, + tag: { + type: 'text', + }, + row_break: true, + }, + }, + width: { + args: { + column: 'width', + label: { + }, + tag: { + type: 'number', + args: { + options: { + size: 5, + }, + }, + }, + }, + }, + height: { + args: { + column: 'height', + label: { + }, + tag: { + type: 'number', + args: { + options: { + size: 5, + }, + }, + }, + row_break: true, + }, + }, + visible: { + args: { + column: 'visible', + label: { + }, + tag: { + type: 'select', + }, + row_break: true, + }, + }, + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + author_id: { + args: { + column: 'author_id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + }, + field_names: [ + 'caption', + 'width', + 'height', + 'visible', + 'id', + 'author_id', + ] + }, + sheet_panel: { + fields: { + sheet_id: { + args: { + column: 'sheet_id', + label: { + }, + tag: { + type: 'number', + }, + }, + }, + panel_id: { + args: { + column: 'panel_id', + label: { + }, + tag: { + type: 'number', + }, + }, + }, + x: { + args: { + column: 'x', + label: { + }, + tag: { + type: 'number', + args: { + options: { + size: 5, + }, + }, + }, + }, + }, + y: { + args: { + column: 'y', + label: { + }, + tag: { + type: 'number', + args: { + options: { + size: 5, + }, + }, + }, + row_break: true, + }, + }, + z: { + args: { + column: 'z', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + t: { + args: { + column: 't', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + }, + field_names: [ + 'sheet_id', + 'panel_id', + 'x', + 'y', + 'z', + 't', + 'id', + ] + }, panel: { fields: { caption: { @@ -775,7 +1248,9 @@ part: 'speech', column: 'content', label: { - row_break: true, + args: { + row_break: true, + }, }, tag: { type: 'text_area', @@ -992,7 +1467,9 @@ args: { column: 'code', label: { - row_break: true, + args: { + row_break: true, + }, }, tag: { type: 'hidden', @@ -1086,6 +1563,72 @@ 't', ] } + author: { + fields: { + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + name: { + args: { + column: 'name', + label: { + args: { + row_break: true, + }, + }, + tag: { + type: 'text', + }, + row_break: true, + }, + }, + }, + field_names: [ + 'id', + 'name', + ] + }, + artist: { + fields: { + id: { + args: { + column: 'id', + label: { + type: 'none', + }, + tag: { + type: 'hidden', + }, + }, + }, + name: { + args: { + column: 'name', + label: { + args: { + row_break: true, + }, + }, + tag: { + type: 'text', + }, + row_break: true, + }, + }, + }, + field_names: [ + 'id', + 'name', + ] + }, }, extend: { CircleSpeechBalloon: { diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fed89b0f..4c64f530 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -139,22 +139,39 @@ class ApplicationController < ActionController::Base end end - def form_new + def set_new set_model @item = @my_model_class.new @item.supply_default + end + + def set_edit + set_model + @item = @my_model_class.edit(params[:id], @operators) + end + + def render_form respond_to do |format| format.html { - @form = Manifest::View::Form.new @item.item_name, @item, true, @operators + @form = Manifest::View::Form.new @item.item_name, @item, true, true, @operators render @form.template_name, :locals => { :form => @form } } - format.js format.json { render json: @item.to_json(@my_model_class.show_json_opt) } end end + def form_new + set_new + render_form + end + + def form_edit + set_edit + render_form + end + def list_count set_list j = {:count => @list.count(@operators, {:id => params[:id]})} diff --git a/app/controllers/artists_controller.rb b/app/controllers/artists_controller.rb index a5fe524d..c46f8649 100644 --- a/app/controllers/artists_controller.rb +++ b/app/controllers/artists_controller.rb @@ -18,7 +18,7 @@ class ArtistsController < ApplicationController def show @item = Artist.show(params[:id], @operators) - + respond_to do |format| format.html { @artist = @item @@ -27,30 +27,19 @@ class ArtistsController < ApplicationController format.json { render :json => @item.to_json(Artist.show_json_opt) } end end - + def count list_count end def new - @artist = Artist.new - @artist.supply_default - - respond_to do |format| - format.html - format.js - format.json { render json: @artist.to_json(Artist.show_json_opt) } - end + form_new end - + def edit - @artist = Artist.edit(params[:id], @operators) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create @artist = Artist.new() @artist.supply_default diff --git a/app/controllers/authors_controller.rb b/app/controllers/authors_controller.rb index dfa8feb3..5fd246e0 100644 --- a/app/controllers/authors_controller.rb +++ b/app/controllers/authors_controller.rb @@ -33,20 +33,13 @@ class AuthorsController < ApplicationController end def new - @author = Author.new - @author.supply_default - - respond_to do |format| - format.html - format.js - format.json { render json: @au.to_json(Author.show_json_opt) } - end + form_new end - + def edit - @author = Author.edit(params[:id], @operators) + form_edit end - + def create @author = Author.new() @author.supply_default diff --git a/app/controllers/comics_controller.rb b/app/controllers/comics_controller.rb index 316f0dd2..6580993c 100644 --- a/app/controllers/comics_controller.rb +++ b/app/controllers/comics_controller.rb @@ -41,23 +41,13 @@ class ComicsController < ApplicationController end def new - @comic = Comic.new - @comic.supply_default - respond_to do |format| - format.html - format.js - format.json { render json: @comic.to_json(Comic.show_json_opt) } - end + form_new end - + def edit - @comic = Comic.edit(params[:id], @operators) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create @comic = Comic.new @comic.supply_default diff --git a/app/controllers/scroll_panels_controller.rb b/app/controllers/scroll_panels_controller.rb index a7852877..f6a93e87 100644 --- a/app/controllers/scroll_panels_controller.rb +++ b/app/controllers/scroll_panels_controller.rb @@ -48,23 +48,13 @@ class ScrollPanelsController < ApplicationController end def new - @scroll_panel = ScrollPanel.new - @scroll_panel.supply_default - respond_to do |format| - format.html - format.js - format.json { render json: @scroll_panel.scroll_panel_as_json(@operators.author) } - end + form_new end - + def edit - @scroll_panel = ScrollPanel.edit(params[:id], @operators) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create @scroll_panel = ScrollPanel.new @scroll_panel.supply_default diff --git a/app/controllers/scrolls_controller.rb b/app/controllers/scrolls_controller.rb index 33bb1f62..4c1a6af0 100644 --- a/app/controllers/scrolls_controller.rb +++ b/app/controllers/scrolls_controller.rb @@ -75,62 +75,59 @@ class ScrollsController < ApplicationController def new form_new end - + def edit - @scroll = Scroll.edit(params[:id], @operators) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create - @scroll = Scroll.new - @scroll.supply_default - @scroll.attributes = params[:scroll] - @scroll.overwrite @operators + @item = Scroll.new + @item.supply_default + @item.attributes = params[:scroll] + @item.overwrite @operators - respond_to do |format| - if @scroll.save + if @item.save + respond_to do |format| flash[:notice] = I18n.t('flash.notice.created', :model => Scroll.model_name.human) - format.html { redirect_to @scroll } - format.json { render json: @scroll.to_json(Scroll.show_json_opt), status: :created, location: @scroll } - else - flash[:notice] = I18n.t('flash.notice.not_created', :model => Scroll.model_name.human) - format.html { render action: "new" } - format.json { render json: @scroll.errors, status: :unprocessable_entity } + format.html { redirect_to @item } + format.json { render json: @item.to_json(Scroll.show_json_opt), status: :created, location: @item } end + else + flash[:notice] = I18n.t('flash.notice.not_created', :model => Scroll.model_name.human) + render_new + format.html { render action: "new" } + format.json { render json: @item.errors, status: :unprocessable_entity } end end def update - @scroll = Scroll.edit(params[:id], @operators) - @scroll.attributes = params[:scroll] - @scroll.overwrite @operators + @item = Scroll.edit(params[:id], @operators) + @item.attributes = params[:scroll] + @item.overwrite @operators respond_to do |format| - if @scroll.save + if @item.save flash[:notice] = I18n.t('flash.notice.updated', :model => Scroll.model_name.human) - format.html { redirect_to @scroll } + format.html { redirect_to @item } format.json { head :ok } else flash[:notice] = I18n.t('flash.notice.not_updated', :model => Scroll.model_name.human) format.html { render action: "edit" } - format.json { render json: @scroll.errors, status: :unprocessable_entity } + format.json { render json: @item.errors, status: :unprocessable_entity } end end end def destroy - @scroll = Scroll.edit(params[:id], @operators) + @item = Scroll.edit(params[:id], @operators) respond_to do |format| - if @scroll.destroy_with_scroll_panel + if @item.destroy_with_scroll_panel flash[:notice] = I18n.t('flash.notice.destroyed', :model => Scroll.model_name.human) format.html { redirect_to '/home/scrolls' } format.json { head :ok } else flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => Scroll.model_name.human) - format.html { redirect_to @scroll } - format.json { render json: @scroll.errors, status: :unprocessable_entity } + format.html { redirect_to @item } + format.json { render json: @item.errors, status: :unprocessable_entity } end end end diff --git a/app/controllers/sheet_panels_controller.rb b/app/controllers/sheet_panels_controller.rb index b3296ee2..9782fc69 100644 --- a/app/controllers/sheet_panels_controller.rb +++ b/app/controllers/sheet_panels_controller.rb @@ -48,23 +48,13 @@ class SheetPanelsController < ApplicationController end def new - @sheet_panel = SheetPanel.new - @sheet_panel.supply_default - respond_to do |format| - format.html - format.js - format.json { render json: @sheet_panel.sheet_panel_as_json(@operators.author) } - end + form_new end - + def edit - @sheet_panel = SheetPanel.edit(params[:id], @operators) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create @sheet_panel = SheetPanel.new @sheet_panel.supply_default diff --git a/app/controllers/sheets_controller.rb b/app/controllers/sheets_controller.rb index 6b621a6c..a43c0090 100644 --- a/app/controllers/sheets_controller.rb +++ b/app/controllers/sheets_controller.rb @@ -88,23 +88,13 @@ class SheetsController < ApplicationController end def new - @sheet = Sheet.new - @sheet.supply_default - respond_to do |format| - format.html - format.js - format.json { render json: @sheet.to_json(Sheet.show_json_opt) } - end + form_new end - + def edit - @sheet = Sheet.edit(params[:id], @operators) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create @sheet = Sheet.new @sheet.supply_default diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb index e4595287..89676e1c 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -88,23 +88,13 @@ class StoriesController < ApplicationController end def new - @story = Story.new - @story.supply_default - respond_to do |format| - format.html - format.js - format.json { render json: @story.to_json(Story.show_json_opt) } - end + form_new end - + def edit - @story = Story.edit(params[:id], @operators) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create @story = Story.new @story.supply_default diff --git a/app/controllers/story_sheets_controller.rb b/app/controllers/story_sheets_controller.rb index e4edfac8..496943fe 100644 --- a/app/controllers/story_sheets_controller.rb +++ b/app/controllers/story_sheets_controller.rb @@ -48,23 +48,13 @@ class StorySheetsController < ApplicationController end def new - @story_sheet = StorySheet.new - @story_sheet.supply_default - respond_to do |format| - format.html - format.js - format.json { render json: @story_sheet.to_json(StorySheet.show_json_opt) } - end + form_new end - + def edit - @story_sheet = StorySheet.edit(params[:id], @author) - respond_to do |format| - format.html - format.js - end + form_edit end - + def create @story_sheet = StorySheet.new @story_sheet.supply_default diff --git a/app/models/comic.rb b/app/models/comic.rb index 9664ded9..92f15684 100644 --- a/app/models/comic.rb +++ b/app/models/comic.rb @@ -60,6 +60,11 @@ class Comic < Peta::Content {:include => {:stories => {}, :author => {}} } end + def tag_attributes column = nil, opt = {} + { + } + end + def destroy_with_story res = false Comic.transaction do diff --git a/app/models/scroll_panel.rb b/app/models/scroll_panel.rb index 78e1cb6a..75e658d5 100644 --- a/app/models/scroll_panel.rb +++ b/app/models/scroll_panel.rb @@ -8,6 +8,11 @@ class ScrollPanel < Peta::Content validates :author_id, :presence => true, :numericality => true, :existence => {:both => false} validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0} + def tag_attributes column = nil, opt = {} + { + } + end + def self.owner_model Scroll end diff --git a/app/models/sheet_panel.rb b/app/models/sheet_panel.rb index 66373fae..efcd98fe 100644 --- a/app/models/sheet_panel.rb +++ b/app/models/sheet_panel.rb @@ -321,7 +321,7 @@ class SheetPanel < Peta::Content end def tag_sheet_id - self.get_sheet == nil or self.get_sheet.new_record? ? '0' : self.get_sheet.id.to_s + (self.get_sheet == nil or self.get_sheet.new_record?) ? '0' : self.get_sheet.id.to_s end def tag_element_id diff --git a/app/models/story.rb b/app/models/story.rb index a3894f29..d24edb21 100644 --- a/app/models/story.rb +++ b/app/models/story.rb @@ -8,6 +8,11 @@ class Story < Peta::Content validates :visible, :presence => true, :numericality => true, :inclusion => {:in => 0..1} validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0} + def tag_attributes column = nil, opt = {} + { + } + end + def self.owner_model Comic end diff --git a/app/models/story_sheet.rb b/app/models/story_sheet.rb index f6e877ce..47750d5e 100644 --- a/app/models/story_sheet.rb +++ b/app/models/story_sheet.rb @@ -8,6 +8,11 @@ class StorySheet < Peta::Content validates :author_id, :presence => true, :numericality => true, :existence => {:both => false} validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0} + def tag_attributes column = nil, opt = {} + { + } + end + def self.owner_model Story end diff --git a/app/views/templates/r/form/_form.html.erb b/app/views/templates/r/form/_form.html.erb index 6a97d601..705d38bf 100644 --- a/app/views/templates/r/form/_form.html.erb +++ b/app/views/templates/r/form/_form.html.erb @@ -1,3 +1,5 @@ <%= form_for(form.item, :html => form.item.tag_attributes('form', 'data-form-name' => form.form_name)) do |f| %> - <%= render form.fields_template_name, :form => form %> + <%= render 'system/error_explanation', :obj => form.item %> + <%= render form.fields_template_name, :form => form, :f => f %> + <%= render form.submit_template_name, :form => form, :f => f %> <% end %> diff --git a/app/views/templates/r/form/submit/_none.html.erb b/app/views/templates/r/form/submit/_none.html.erb new file mode 100644 index 00000000..e69de29b diff --git a/app/views/templates/r/form/submit/_submit.html.erb b/app/views/templates/r/form/submit/_submit.html.erb new file mode 100644 index 00000000..6c8d8cf0 --- /dev/null +++ b/app/views/templates/r/form/submit/_submit.html.erb @@ -0,0 +1,3 @@ +
+ <%= f.submit t(form.submit_name), :class => "submit" %> +
diff --git a/config/locales/pettanr.ja.yml b/config/locales/pettanr.ja.yml index 2416ddb0..7ac7f8dc 100644 --- a/config/locales/pettanr.ja.yml +++ b/config/locales/pettanr.ja.yml @@ -543,10 +543,6 @@ ja: play: title: スクロールを読む empty: スクコマはありません - scroll_panels: - title: スクロールのスクコマ一覧 - panels: - title: スクロールのコマ一覧 by_author: title: 作家のスクロール一覧 by_panel: @@ -561,10 +557,9 @@ ja: title: スクロール変更 destroy: title: スクロール削除 - list: - title: スクロール 生一覧 - browse: - title: スクロール 生単票 + submit: + new: 新刊作成 + edit: スクロール変更 scroll_panels: index: title: スクコマ一覧 @@ -584,10 +579,9 @@ ja: title: 並び替え destroy: title: スクコマ削除 - list: - title: スクコマ 生一覧 - browse: - title: スクコマ 生単票 + submit: + new: スクコマ作成 + edit: スクコマ変更 move: 移動 append: panel: このコマを追加する @@ -600,8 +594,6 @@ ja: index: title: コミック一覧 new: 新刊 - stories: - title: コミックのストーリー一覧 by_author: title: 作家のコミック一覧 show: @@ -616,10 +608,9 @@ ja: title: コミック変更 destroy: title: コミック削除 - list: - title: コミック 生一覧 - browse: - title: コミック 生単票 + submit: + new: コミック作成 + edit: コミック変更 stories: story_sheets_count: '%{c}P' index: @@ -631,10 +622,6 @@ ja: play: title: ストーリーを読む empty: 用紙はありません - story_sheets: - title: ストーリーのスト紙一覧 - sheets: - title: ストーリーの用紙一覧 by_comic: title: コミックのストーリー一覧 by_sheet: @@ -651,10 +638,9 @@ ja: title: ストーリー変更 destroy: title: ストーリー削除 - list: - title: ストーリー 生一覧 - browse: - title: ストーリー 生単票 + submit: + new: ストーリー作成 + edit: ストーリー変更 move: 移動 story_sheets: index: @@ -675,10 +661,9 @@ ja: title: 並び替え destroy: title: スト紙削除 - list: - title: スト紙 生一覧 - browse: - title: スト紙 生単票 + submit: + new: スト紙作成 + edit: スト紙変更 move: 移動 append: sheet: この用紙を追加する @@ -697,14 +682,6 @@ ja: play: title: 用紙を読む empty: 紙コマはありません - story_sheets: - title: 用紙のスト紙一覧 - stories: - title: 用紙のストーリー一覧 - sheet_panels: - title: 用紙の紙コマ一覧 - panels: - title: 用紙のコマ一覧 by_story: title: ストーリーの用紙一覧 by_panel: @@ -721,10 +698,9 @@ ja: title: 用紙変更 destroy: title: 用紙削除 - list: - title: 用紙 生一覧 - browse: - title: 用紙 生単票 + submit: + new: 用紙作成 + edit: 用紙変更 hidden: 権限がありません create_from_json: jsonデータからコマ作成する sheet_panels: @@ -746,11 +722,9 @@ ja: title: 並び替え destroy: title: 紙コマ削除 - list: - title: 紙コマ 生一覧 - browse: - title: 紙コマ 生単票 - submit: 作成する + submit: + new: 紙コマ作成 + edit: 紙コマ変更 move: 移動 append: panel: このコマを追加する @@ -761,22 +735,6 @@ ja: panels: index: title: コマ一覧 - scroll_panels: - title: コマのスクコマ一覧 - scrolls: - title: コマのスクロール一覧 - sheet_panels: - title: コマの紙コマ一覧 - sheets: - title: コマの用紙一覧 - panel_pictures: - title: コマのコマ絵一覧 - speech_balloons: - title: コマのフキダシ一覧 - ground_pictures: - title: コマの絵地一覧 - ground_colors: - title: コマの色地一覧 by_scroll: title: スクロールのコマ一覧 by_sheet: @@ -797,11 +755,9 @@ ja: title: コマ編集 destroy: title: コマ削除 - list: - title: コマ 生一覧 - browse: - title: コマ 生単票 - submit: コマ作成する + submit: + new: コマ作成する + edit: コマ変更する create_from_json: jsonデータからコマ作成する element_copy: つかんでいるコマにコピーしたい inspire: インスパイヤ @@ -825,11 +781,9 @@ ja: title: コマ絵編集 destroy: title: コマ絵削除 - list: - title: コマ絵 生一覧 - browse: - title: コマ絵 生単票 - submit: 作成する + submit: + new: コマ絵作成する + edit: コマ絵変更する resource_picture: 追加する素材 panel_picture: 変更するコマ絵 speech_balloons: @@ -851,10 +805,9 @@ ja: title: フキダシ編集 destroy: title: フキダシ削除 - list: - title: フキダシ 生一覧 - browse: - title: フキダシ 生単票 + submit: + new: フキダシ作成する + edit: フキダシ変更する create_speech_balloon: 追加するフキダシ update_speech_balloon: 変更するフキダシ submit: 作成する @@ -867,10 +820,9 @@ ja: title: 記法のセリフ一覧 show: title: セリフ詳細 - list: - title: セリフ 生一覧 - browse: - title: セリフ 生単票 + submit: + new: セリフ作成する + edit: セリフ変更する balloons: index: title: フキダシ枠一覧 @@ -878,10 +830,9 @@ ja: title: フキダシのフキダシ枠一覧 show: title: フキダシ枠詳細 - list: - title: フキダシ枠 生一覧 - browse: - title: フキダシ枠 生単票 + submit: + new: フキダシ枠作成する + edit: フキダシ枠変更する ground_pictures: index: title: 絵地一覧 @@ -901,10 +852,9 @@ ja: title: 絵地編集 destroy: title: 絵地削除 - list: - title: 絵地 生一覧 - browse: - title: 絵地 生単票 + submit: + new: 絵地作成する + edit: 絵地変更する create_ground_picture: 追加する絵地 update_ground_picture: 変更する絵地 submit: 作成する @@ -927,10 +877,9 @@ ja: title: 色地編集 destroy: title: 色地削除 - list: - title: 色地 生一覧 - browse: - title: 色地 生単票 + submit: + new: 色地作成する + edit: 色地変更する create_color: 追加する色地 update_color: 変更する色地 submit: 作成する @@ -958,10 +907,6 @@ ja: title: 原画改訂 destroy: title: 原画削除 - list: - title: 原画 生一覧 - browse: - title: 原画 生単票 history: title: 公開履歴 upload: 投稿する @@ -988,10 +933,6 @@ ja: title: 実素材MD5検索一覧 credit: title: クレジット - list: - title: 実素材 生一覧 - browse: - title: 実素材 生単票 resource_pictures: index: title: 素材一覧 @@ -1008,10 +949,6 @@ ja: title: 画像の公開(最終確認) destroy: title: 素材削除 - list: - title: 素材 生一覧 - browse: - title: 素材 生単票 add_to_panel_for_panel_picture: この素材をつかんだコマにコマ絵として追加する add_to_panel_for_ground_picture: この素材をつかんだコマに絵地として追加する original_picture_license_groups: @@ -1032,10 +969,6 @@ ja: title: システム画像のフキダシテンプレート一覧 show: title: フキダシテンプレート詳細 - list: - title: フキダシテンプレート 生一覧 - browse: - title: フキダシテンプレート 生単票 add_to_panel: このフキダシをつかんだコマに追加する writing_formats: index: @@ -1049,10 +982,6 @@ ja: title: ライセンスグループのライセンス一覧 show: title: ライセンスグループ詳細 - list: - title: ライセンスグループ 生一覧 - browse: - title: ライセンスグループ 生単票 licenses: index: title: ライセンス一覧 @@ -1066,10 +995,6 @@ ja: title: ライセンス詳細 search: title: ライセンス検索 - list: - title: ライセンス 生一覧 - browse: - title: ライセンス 生単票 authors: index: title: 作家一覧 @@ -1087,30 +1012,6 @@ ja: to_speech_balloons: 最近更新したフキダシ to_ground_pictures: 最近コマで使った絵地 to_ground_colors: 最近コマで使った色地 - scrolls: - title: 最近更新したスクロール - scroll_panels: - title: 最近更新したスクコマ - comics: - title: 最近更新したコミック - stories: - title: 最近更新したストーリー - story_sheets: - title: 最近更新したスト紙 - sheets: - title: 最近更新した用紙 - sheet_panels: - title: 最近更新した紙コマ - panels: - title: 最近更新したコマ - panel_pictures: - title: 最近更新したコマ絵 - speech_balloons: - title: 最近更新したフキダシ - ground_pictures: - title: 最近更新した絵地 - ground_colors: - title: 最近更新した色地 new: title: 作家登録 announce: 作家登録してください @@ -1122,10 +1023,6 @@ ja: title: 作家プロフィール編集 destroy: title: 休筆 - list: - title: 作家 生一覧 - browse: - title: 作家 生単票 artists: index: title: 絵師一覧 @@ -1144,10 +1041,6 @@ ja: title: 絵師プロフィール編集 destroy: title: 活動停止 - list: - title: 絵師 生一覧 - browse: - title: 絵師 生単票 system_pictures: index: title: システム画像一覧 @@ -1157,10 +1050,6 @@ ja: title: システム画像のライセンス一覧 show: title: システム画像詳細 - list: - title: システム画像 生一覧 - browse: - title: システム画像 生単票 provider_sources: index: title: 貸手文献一覧 diff --git a/lib/manifest/controller/action.rb b/lib/manifest/controller/action.rb index 9fcdf3c9..227dac8b 100644 --- a/lib/manifest/controller/action.rb +++ b/lib/manifest/controller/action.rb @@ -3,12 +3,14 @@ require_dependency "manifest/controller/action/list" require_dependency "manifest/controller/action/show" require_dependency "manifest/controller/action/count" require_dependency "manifest/controller/action/new" +require_dependency "manifest/controller/action/edit" module Manifest module ControllerModule class ActionFactory include ActionModule @@types = { - 'list' => ActionList, 'show' => ActionShow, 'count' => ActionCount, 'new' => ActionNew + 'list' => ActionList, 'show' => ActionShow, 'count' => ActionCount, + 'new' => ActionNew, 'edit' => ActionEdit } def self.factory controller, action_name, my_manifest my_manifest['type'] ||= 'list' diff --git a/lib/manifest/controller/action/edit.rb b/lib/manifest/controller/action/edit.rb new file mode 100644 index 00000000..654a7685 --- /dev/null +++ b/lib/manifest/controller/action/edit.rb @@ -0,0 +1,18 @@ +module Manifest + module ControllerModule + module ActionModule + class ActionEdit < Base + + def set_default + super + end + + def init + super + end + + end + + end + end +end diff --git a/lib/manifest/local/view/form.rb b/lib/manifest/local/view/form.rb index b42ec5cd..ffa85818 100644 --- a/lib/manifest/local/view/form.rb +++ b/lib/manifest/local/view/form.rb @@ -3,12 +3,13 @@ module Manifest module View class Form include FormModule - attr :form_name, :item, :mounted, :operators, :template_dir, + attr :form_name, :item, :mounted, :submit, :operators, :template_dir, :fields - def initialize form_name, item, mounted, operators + def initialize form_name, item, mounted, submit, operators @form_name = form_name @item = item @mounted = mounted + @submit = submit @operators = operators @manifest = Manifest.manifest.forms[@form_name] @template_dir = 'templates/r/form/' @@ -32,6 +33,26 @@ module Manifest self.template_dir + self.template_file_name end + def submit_name + if @item.new_record? + @item.table_name + '.submit.new' + else + @item.table_name + '.submit.edit' + end + end + + def submit_template_dir + self.template_dir + 'submit/' + end + + def submit_template_name + if @submit + self.submit_template_dir + 'submit' + else + self.submit_template_dir + 'none' + end + end + def fields_template_name self.template_dir + 'fields' end diff --git a/lib/peta/item.rb b/lib/peta/item.rb index 4af8f111..25acd422 100644 --- a/lib/peta/item.rb +++ b/lib/peta/item.rb @@ -89,6 +89,10 @@ module Peta self.item_name end + def table_name + self.class.table_name + end + def extend_column nil end diff --git a/public/manifest.json b/public/manifest.json index dc6a6a5e..7bae1a03 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -38,6 +38,9 @@ }, "new": { "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -66,6 +69,12 @@ }, "count_by_scroll": { "type": "count" + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -88,6 +97,12 @@ }, "count_by_author": { "type": "count" + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -122,6 +137,12 @@ }, "count_by_author": { "type": "count" + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -150,6 +171,12 @@ }, "count_by_sheet": { "type": "count" + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -190,6 +217,12 @@ }, "count_by_author": { "type": "count" + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -218,6 +251,12 @@ }, "count_by_panel": { "type": "count" + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -258,6 +297,12 @@ }, "count_by_speech_balloon_template": { "type": "count" + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -605,6 +650,12 @@ "args": { "list_name": "public_list" } + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -627,6 +678,12 @@ "args": { "list_name": "public_list" } + }, + "new": { + "type": "new" + }, + "edit": { + "type": "edit" } } }, @@ -4657,7 +4714,11 @@ "title": { "args": { "column": "title", - "label": {}, + "label": { + "args": { + "row_break": true + } + }, "tag": { "type": "text" }, @@ -4667,12 +4728,16 @@ "description": { "args": { "column": "description", - "label": {}, + "label": { + "args": { + "row_break": true + } + }, "tag": { "type": "text_area", "args": { "options": { - "size": 5 + "size": "45x15" } } } @@ -4719,64 +4784,91 @@ "author_id" ] }, - "panel": { + "scroll_panel": { "fields": { - "caption": { + "scroll_id": { "args": { - "column": "caption", + "column": "scroll_id", "label": {}, "tag": { - "type": "text" - }, - "row_break": true + "type": "number" + } } }, - "width": { + "panel_id": { "args": { - "column": "width", + "column": "panel_id", "label": {}, "tag": { - "type": "number", - "args": { - "options": { - "size": 5 - } - } + "type": "number" } } }, - "height": { + "t": { "args": { - "column": "height", + "column": "t", "label": {}, "tag": { - "type": "number", + "type": "number" + } + } + }, + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + } + }, + "field_names": [ + "scroll_id", + "panel_id", + "t", + "id" + ] + }, + "comic": { + "fields": { + "title": { + "args": { + "column": "title", + "label": { "args": { - "options": { - "size": 5 - } + "row_break": true } }, + "tag": { + "type": "text" + }, "row_break": true } }, - "border": { + "description": { "args": { - "column": "border", - "label": {}, + "column": "description", + "label": { + "args": { + "row_break": true + } + }, "tag": { - "type": "number", + "type": "text_area", "args": { "options": { - "size": 5 + "size": "45x15" } } } } }, - "publish": { + "visible": { "args": { - "column": "publish", + "column": "visible", "label": {}, "tag": { "type": "select" @@ -4808,112 +4900,76 @@ } }, "field_names": [ - "caption", - "width", - "height", - "border", - "publish", + "title", + "description", + "visible", "id", "author_id" ] }, - "panel_picture": { + "story": { "fields": { - "caption": { + "comic_id": { "args": { - "column": "caption", - "label": {}, - "tag": { - "type": "text" + "column": "comic_id", + "label": { + "type": "none" }, - "row_break": true - } - }, - "x": { - "args": { - "column": "x", - "label": {}, "tag": { - "type": "number", - "args": { - "options": { - "size": 5 - } - } + "type": "hidden" } } }, - "y": { + "title": { "args": { - "column": "y", - "label": {}, - "tag": { - "type": "number", + "column": "title", + "label": { "args": { - "options": { - "size": 5 - } + "row_break": true } }, + "tag": { + "type": "text" + }, "row_break": true } }, - "width": { + "description": { "args": { - "column": "width", - "label": {}, - "tag": { - "type": "number", + "column": "description", + "label": { "args": { - "options": { - "size": 5 - } + "row_break": true } }, - "helpers": { - "size": { - "type": "size", - "args": { - "path": "panels/size_helper", - "class": "panel_picture_width_tool" + "tag": { + "type": "text_area", + "args": { + "options": { + "size": "45x15" } } }, "row_break": true } }, - "height": { + "visible": { "args": { - "column": "height", + "column": "visible", "label": {}, "tag": { - "type": "number", - "args": { - "options": { - "size": 5 - } - } - }, - "helpers": { - "size": { - "type": "size", - "args": { - "path": "panels/size_helper", - "class": "panel_picture_height_tool" - } - } + "type": "select" }, "row_break": true } }, - "link": { + "t": { "args": { - "column": "link", + "column": "t", "label": {}, "tag": { - "type": "text" - }, - "row_break": true + "type": "number" + } } }, "id": { @@ -4927,9 +4983,9 @@ } } }, - "panel_id": { + "author_id": { "args": { - "column": "panel_id", + "column": "author_id", "label": { "type": "none" }, @@ -4937,33 +4993,495 @@ "type": "hidden" } } - }, - "picture_id": { + } + }, + "field_names": [ + "comic_id", + "title", + "description", + "visible", + "t", + "id", + "author_id" + ] + }, + "story_sheet": { + "fields": { + "story_id": { "args": { - "column": "picture_id", - "label": {}, - "tag": { - "type": "hidden" + "column": "story_id", + "label": { + "type": "none" }, - "helpers": { - "popup": { - "type": "size", - "args": { - "path": "panels/popup_helper", - "source": "pictures" - } - } + "tag": { + "type": "number" } } }, - "z": { + "sheet_id": { "args": { - "column": "z", + "column": "sheet_id", "label": { "type": "none" }, "tag": { - "type": "hidden" + "type": "number" + } + } + }, + "t": { + "args": { + "column": "t", + "label": {}, + "tag": { + "type": "number" + } + } + }, + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + } + }, + "field_names": [ + "story_id", + "sheet_id", + "t", + "id" + ] + }, + "sheet": { + "fields": { + "caption": { + "args": { + "column": "caption", + "label": { + "args": { + "row_break": true + } + }, + "tag": { + "type": "text" + }, + "row_break": true + } + }, + "width": { + "args": { + "column": "width", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + } + } + }, + "height": { + "args": { + "column": "height", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + }, + "row_break": true + } + }, + "visible": { + "args": { + "column": "visible", + "label": {}, + "tag": { + "type": "select" + }, + "row_break": true + } + }, + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "author_id": { + "args": { + "column": "author_id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + } + }, + "field_names": [ + "caption", + "width", + "height", + "visible", + "id", + "author_id" + ] + }, + "sheet_panel": { + "fields": { + "sheet_id": { + "args": { + "column": "sheet_id", + "label": {}, + "tag": { + "type": "number" + } + } + }, + "panel_id": { + "args": { + "column": "panel_id", + "label": {}, + "tag": { + "type": "number" + } + } + }, + "x": { + "args": { + "column": "x", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + } + } + }, + "y": { + "args": { + "column": "y", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + }, + "row_break": true + } + }, + "z": { + "args": { + "column": "z", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "t": { + "args": { + "column": "t", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + } + }, + "field_names": [ + "sheet_id", + "panel_id", + "x", + "y", + "z", + "t", + "id" + ] + }, + "panel": { + "fields": { + "caption": { + "args": { + "column": "caption", + "label": {}, + "tag": { + "type": "text" + }, + "row_break": true + } + }, + "width": { + "args": { + "column": "width", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + } + } + }, + "height": { + "args": { + "column": "height", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + }, + "row_break": true + } + }, + "border": { + "args": { + "column": "border", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + } + } + }, + "publish": { + "args": { + "column": "publish", + "label": {}, + "tag": { + "type": "select" + }, + "row_break": true + } + }, + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "author_id": { + "args": { + "column": "author_id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + } + }, + "field_names": [ + "caption", + "width", + "height", + "border", + "publish", + "id", + "author_id" + ] + }, + "panel_picture": { + "fields": { + "caption": { + "args": { + "column": "caption", + "label": {}, + "tag": { + "type": "text" + }, + "row_break": true + } + }, + "x": { + "args": { + "column": "x", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + } + } + }, + "y": { + "args": { + "column": "y", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + }, + "row_break": true + } + }, + "width": { + "args": { + "column": "width", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + }, + "helpers": { + "size": { + "type": "size", + "args": { + "path": "panels/size_helper", + "class": "panel_picture_width_tool" + } + } + }, + "row_break": true + } + }, + "height": { + "args": { + "column": "height", + "label": {}, + "tag": { + "type": "number", + "args": { + "options": { + "size": 5 + } + } + }, + "helpers": { + "size": { + "type": "size", + "args": { + "path": "panels/size_helper", + "class": "panel_picture_height_tool" + } + } + }, + "row_break": true + } + }, + "link": { + "args": { + "column": "link", + "label": {}, + "tag": { + "type": "text" + }, + "row_break": true + } + }, + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "panel_id": { + "args": { + "column": "panel_id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "picture_id": { + "args": { + "column": "picture_id", + "label": {}, + "tag": { + "type": "hidden" + }, + "helpers": { + "popup": { + "type": "size", + "args": { + "path": "panels/popup_helper", + "source": "pictures" + } + } + } + } + }, + "z": { + "args": { + "column": "z", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" } } }, @@ -5379,7 +5897,9 @@ "part": "speech", "column": "content", "label": { - "row_break": true + "args": { + "row_break": true + } }, "tag": { "type": "text_area", @@ -5591,7 +6111,9 @@ "args": { "column": "code", "label": { - "row_break": true + "args": { + "row_break": true + } }, "tag": { "type": "hidden" @@ -5681,6 +6203,72 @@ "z", "t" ] + }, + "author": { + "fields": { + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "name": { + "args": { + "column": "name", + "label": { + "args": { + "row_break": true + } + }, + "tag": { + "type": "text" + }, + "row_break": true + } + } + }, + "field_names": [ + "id", + "name" + ] + }, + "artist": { + "fields": { + "id": { + "args": { + "column": "id", + "label": { + "type": "none" + }, + "tag": { + "type": "hidden" + } + } + }, + "name": { + "args": { + "column": "name", + "label": { + "args": { + "row_break": true + } + }, + "tag": { + "type": "text" + }, + "row_break": true + } + } + }, + "field_names": [ + "id", + "name" + ] } }, "extend": { -- 2.11.0