Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add button for feature combinations #44

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions grambank/templates/parameter/detail_html.mako
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<%inherit file="../${context.get('request').registry.settings.get('clld.app_template', 'app.mako')}"/>
<%namespace name="util" file="../util.mako"/>
<% from clld.db.meta import DBSession %>
<% from grambank import models %>

<%! active_menu_item = "parameters" %>
<%block name="title">Feature ${ctx.id}: ${ctx.name}</%block>
Expand Down Expand Up @@ -59,6 +61,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 DBSession.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