Tweak structure of "view product" page to support Buefy, context menu
This commit is contained in:
parent
c44c6c79f9
commit
f25e4fab28
|
@ -276,63 +276,88 @@
|
|||
|
||||
<%def name="extra_right_panels()"></%def>
|
||||
|
||||
<%def name="render_form()">
|
||||
<%def name="render_form_complete()">
|
||||
% if use_buefy:
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
${self.render_form()}
|
||||
<script type="text/x-template" id="form-page-template">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
|
||||
<nav class="panel" id="main-product-panel">
|
||||
<p class="panel-heading">Product</p>
|
||||
<div class="panel-block">
|
||||
<div style="display: flex; justify-content: space-between; width: 100%;">
|
||||
<div>
|
||||
${self.render_main_fields(form)}
|
||||
</div>
|
||||
<div>
|
||||
% if image_url:
|
||||
${h.image(image_url, "Product Image", id='product-image', width=150, height=150)}
|
||||
% endif
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
|
||||
<nav class="panel" id="main-product-panel">
|
||||
<p class="panel-heading">Product</p>
|
||||
<div class="panel-block">
|
||||
<div style="display: flex; justify-content: space-between; width: 100%;">
|
||||
<div>
|
||||
${self.render_main_fields(form)}
|
||||
</div>
|
||||
<div>
|
||||
% if image_url:
|
||||
${h.image(image_url, "Product Image", id='product-image', width=150, height=150)}
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div style="display: flex;">
|
||||
<div class="panel-wrapper"> <!-- left column -->
|
||||
${self.left_column()}
|
||||
</div> <!-- left column -->
|
||||
<div class="panel-wrapper" style="margin-left: 1em;"> <!-- right column -->
|
||||
${self.right_column()}
|
||||
</div> <!-- right column -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div style="display: flex;">
|
||||
<div class="panel-wrapper"> <!-- left column -->
|
||||
${self.left_column()}
|
||||
</div> <!-- left column -->
|
||||
<div class="panel-wrapper" style="margin-left: 1em;"> <!-- right column -->
|
||||
${self.right_column()}
|
||||
</div> <!-- right column -->
|
||||
<ul id="context-menu">
|
||||
${self.context_menu_items()}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</script>
|
||||
<div id="form-page-app">
|
||||
<form-page></form-page>
|
||||
</div>
|
||||
% else:
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
|
||||
<div class="panel" id="product-main">
|
||||
<h2>Product</h2>
|
||||
<div class="panel-body">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<div>
|
||||
${self.render_main_fields(form)}
|
||||
</div>
|
||||
<div>
|
||||
% if image_url:
|
||||
${h.image(image_url, "Product Image", id='product-image', width=150, height=150)}
|
||||
% endif
|
||||
% else:
|
||||
## legacy / not buefy
|
||||
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
|
||||
<div class="panel" id="product-main">
|
||||
<h2>Product</h2>
|
||||
<div class="panel-body">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<div>
|
||||
${self.render_main_fields(form)}
|
||||
</div>
|
||||
<div>
|
||||
% if image_url:
|
||||
${h.image(image_url, "Product Image", id='product-image', width=150, height=150)}
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;">
|
||||
<div class="panel-wrapper"> <!-- left column -->
|
||||
${self.left_column()}
|
||||
</div> <!-- left column -->
|
||||
<div class="panel-wrapper" style="margin-left: 1em;"> <!-- right column -->
|
||||
${self.right_column()}
|
||||
</div> <!-- right column -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="display: flex;">
|
||||
<div class="panel-wrapper"> <!-- left column -->
|
||||
${self.left_column()}
|
||||
</div> <!-- left column -->
|
||||
<div class="panel-wrapper" style="margin-left: 1em;"> <!-- right column -->
|
||||
${self.right_column()}
|
||||
</div> <!-- right column -->
|
||||
</div>
|
||||
<ul id="context-menu">
|
||||
${self.context_menu_items()}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
% endif
|
||||
|
|
Loading…
Reference in a new issue