Skip to content

Commit

Permalink
add button for feature combinations (#44)
Browse files Browse the repository at this point in the history
* add button for feature combinations

* more idiomatic database access
  • Loading branch information
johenglisch authored Mar 9, 2023
1 parent e169a1f commit ead7699
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions grambank/templates/parameter/detail_html.mako
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<%inherit file="../${context.get('request').registry.settings.get('clld.app_template', 'app.mako')}"/>
<%namespace name="util" file="../util.mako"/>
<% from grambank import models %>
<%! active_menu_item = "parameters" %>
<%block name="title">Feature ${ctx.id}: ${ctx.name}</%block>
Expand Down Expand Up @@ -59,6 +60,25 @@ ${u.process_markdown(ctx.description, req)|n}

<br style="clear: right"/>

<div class="well well-small">
<p>
You may combine this variable with a different variable by selecting on in the list below
and clicking "Submit".
</p>
<form action="${request.route_url('select_combination')}"
method="get"
class="form-inline">
<input type="hidden" name="parameters" value="${ctx.id}"/>
<select id="pa" name="parameters">
<label for="pa">Variable</label>
% for param in request.db.query(models.Parameter).filter(models.Parameter.pk != ctx.pk):
<option value="${param.id}">${param.id} ${param.name}</option>
% endfor
</select>
<button class="btn" type="submit">Submit</button>
</form>
</div>

<h3 id="map-container">
Map
<a href="#top" title="go to top of the page" style="vertical-align: bottom">&#x21eb;</a>
Expand Down

0 comments on commit ead7699

Please sign in to comment.