From: Karl O. Pinc Date: Thu, 1 Aug 2024 22:24:35 +0000 (-0500) Subject: Move table rows into their own %def X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=78ba8557f7e021dce8ec1a846399fd99553e1c62;p=pgwui_common Move table rows into their own %def --- diff --git a/src/pgwui_common/templates/auth_base.mak b/src/pgwui_common/templates/auth_base.mak index 098b54a..927c4b2 100644 --- a/src/pgwui_common/templates/auth_base.mak +++ b/src/pgwui_common/templates/auth_base.mak @@ -136,6 +136,14 @@ % endif +<%def name="table_rows(tab_index)"> + <% + self.user_row(tab_index, havecreds, user) + self.password_row(tab_index, havecreds) + caller.body(tab_index) + %> + + <%def name="main_form(tab_index)">
@@ -149,15 +157,7 @@
- <% - if hasattr(caller, 'database_row'): - caller.database_row(tab_index) - self.user_row(tab_index, havecreds, user) - self.password_row(tab_index, havecreds) - - caller.body(tab_index) - - %> + <%self:table_rows tab_index="${tab_index}" args="tab_index"/>

diff --git a/src/pgwui_common/templates/db_base.mak b/src/pgwui_common/templates/db_base.mak index 80b2775..694b6ef 100644 --- a/src/pgwui_common/templates/db_base.mak +++ b/src/pgwui_common/templates/db_base.mak @@ -64,26 +64,27 @@ table. -<%def name="main_form(tab_index)"> - <%parent:main_form tab_index="${tab_index}" args="tab_index"> - <%def name="database_row(tab_index)"> - - - - - - - - - <% tab_index.inc() %> - +<%def name="database_row(tab_index)"> + + + + + + + + + <% tab_index.inc() %> + +<%def name="table_rows(tab_index)"> + ${self.database_row(tab_index)} + <%parent:table_rows tab_index="${tab_index}" args="tab_index"> <% caller.body(tab_index) %> - +