diff --git a/lib/GADS.pm b/lib/GADS.pm index 75047ab81..f26807fec 100644 --- a/lib/GADS.pm +++ b/lib/GADS.pm @@ -1326,11 +1326,13 @@ any ['get', 'post'] => '/settings/audit/?' => require_role audit => sub { }; get '/table/?' => require_login sub { - template 'tables' => { - page => 'table', - instances => [rset('Instance')->all], - + page => 'table', + instances => [ rset('Instance')->all ], + instance_layouts => var('instances')->all, + instances_object => var('instances'), + groups => GADS::Groups->new(schema => schema)->all, + permission_inputs => GADS::Type::Permissions->permission_inputs, }; }; @@ -1410,8 +1412,7 @@ any ['get', 'post'] => '/table/:id/edit' => require_role superadmin => sub { page => 'table_edit', content_block_custom_classes => 'content-block--footer', detail_header => 1, - layout_obj => $layout, - groups => GADS::Groups->new(schema => schema)->all, + layout_obj => $layout } }; diff --git a/views/tables.tt b/views/tables.tt index 085d8aec7..6a8a799b7 100644 --- a/views/tables.tt +++ b/views/tables.tt @@ -57,7 +57,7 @@ description = "A table in LinkSpace is comparable to a worksheet in a spreadsheet. Here you can enter, create, edit, and delete your tables." aside_buttons = ! user.permission.superadmin ? [] : [{ type = "modal_button" - modalId = "tableModal" + modalId = "newTableModal" class = "btn btn-add" label = "New table" }]; @@ -66,3 +66,5 @@
[% INCLUDE tables/basic_table.tt; %]
+ +[% INCLUDE wizard/table_add.tt endpoint="/api/user_account" %] diff --git a/views/wizard/table_add.tt b/views/wizard/table_add.tt new file mode 100644 index 000000000..013c84474 --- /dev/null +++ b/views/wizard/table_add.tt @@ -0,0 +1,1430 @@ +