Skip to content

Commit

Permalink
WIP Add new table wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
stolman-digitpaint committed Apr 19, 2022
1 parent 4451153 commit 028b60e
Show file tree
Hide file tree
Showing 3 changed files with 1,440 additions and 7 deletions.
13 changes: 7 additions & 6 deletions lib/GADS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
};

Expand Down Expand Up @@ -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
}
};

Expand Down
4 changes: 3 additions & 1 deletion views/tables.tt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}];
Expand All @@ -66,3 +66,5 @@
<div class="content-block__main">
[% INCLUDE tables/basic_table.tt; %]
</div>

[% INCLUDE wizard/table_add.tt endpoint="/api/user_account" %]
Loading

0 comments on commit 028b60e

Please sign in to comment.