Skip to content

Commit

Permalink
Merge 4381d29 into 08f69b8
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaLekic authored Dec 25, 2019
2 parents 08f69b8 + 4381d29 commit 65c7bdb
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 53 deletions.
2 changes: 1 addition & 1 deletion ckanext/knowledgehub/fanstatic/css/main.css

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions ckanext/knowledgehub/fanstatic/less/_visualizations.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,41 @@
}
}

#intents {
text-align: center;
}

#intents-header th {
text-align: center;
}

#intents tfoot {
background-color: #bfdcee;
}

#intents thead {
background-color: #bfdcee;
}

#intents_filter {
width: 33rem;
margin-bottom: 5px;
}

#intents_filter input {
border-radius: 4px;
width: 25rem;
}

#intents_length select {
background-color: transparent;
border-radius: 4px;
}

#intents_length label {
cursor: default;
}

.no-items {
margin-bottom: @grid-gutter-width * 2;
}
Expand Down
105 changes: 53 additions & 52 deletions ckanext/knowledgehub/templates/user/intents.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,62 @@
{% extends "user/read_base.html" %}

{% block primary_content_inner %}
<h2>Clasified Intents</h2>
<table id="intents" class="table table-hover table-responsive" cellspacing="0" width="100%">
<thead>
<tr>
<th class="hidden">ID</th>
<th class="th-lr">Transactional</th>
<th class="th-lr">Navigational</th>
<th class="th-lr">Informational</th>
<th class="col-md-1">Remove</th>
</tr>
</thead>
<tbody>
{% for i in intents %}
<tr>
<td class="hidden">{{ i.get('id') }}</td>
<td>{{ i.get('inferred_transactional') }}</td>
<td>{{ i.get('inferred_navigational') }}</td>
<td>{{ i.get('inferred_informational') }}</td>
<td>
<span class="table-remove">
<button type="button" class="btn btn-danger btn-rounded btn-sm my-0">Remove</button>
</span>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th class="hidden">ID</th>
<th>Transactional</th>
<th>Navigational</th>
<th>Informational</th>
<th>Remove</th>
</tr>
</tfoot>
</table>
<h2 style="padding-bottom:20px;">Clasified Intents</h2>
<table id="intents" class="table table-hover dataTables_wrapper" cellspacing="0" width="100%">
<thead>
<tr id="intents-header">
<th class="hidden">ID</th>
<th>Transactional</th>
<th>Navigational</th>
<th>Informational</th>
<th style="text-align: end; padding-right: 20px;">Remove</th>
</tr>
</thead>
<tbody>
{% for i in intents %}
<tr>
<td class="hidden">{{ i.get('id') }}</td>
<td>{{ i.get('inferred_transactional') }}</td>
<td>{{ i.get('inferred_navigational') }}</td>
<td>{{ i.get('inferred_informational') }}</td>
<td style="text-align: end">
<span class="table-remove">
<button type="button" class="btn btn-danger btn-rounded btn-sm my-0"
style="border-radius: 4px;">Remove</button>
</span>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th class="hidden">ID</th>
<th>Transactional</th>
<th>Navigational</th>
<th>Informational</th>
<th>Remove</th>
</tr>
</tfoot>
</table>

<div class="modal fade" id="modalDelete" tabindex="-1" role="dialog" aria-labelledby="modalDelete" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold ml-5 text-danger">Delete</h4>
<button type="button" class="close text-danger" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body mx-3">
<p class="text-center h4">Are you sure to delete selected row?</p>
<div class="modal fade" id="modalDelete" tabindex="-1" role="dialog" aria-labelledby="modalDelete" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold ml-5 text-danger">Delete</h4>
<button type="button" class="close text-danger" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body mx-3">
<p class="text-center h4">Are you sure to delete selected row?</p>

</div>
<div class="modal-footer d-flex justify-content-center deleteButtonsWrapper">
<button type="button" class="btn btn-danger btnYesClass" id="btnYes" data-dismiss="modal">Yes</button>
<button type="button" class="btn btn-primary btnNoClass" id="btnNo" data-dismiss="modal">No</button>
</div>
</div>
<div class="modal-footer d-flex justify-content-center deleteButtonsWrapper">
<button type="button" class="btn btn-danger btnYesClass" id="btnYes" data-dismiss="modal">Yes</button>
<button type="button" class="btn btn-primary btnNoClass" id="btnNo" data-dismiss="modal">No</button>
</div>
</div>
</div>
</div>
{% endblock %}

0 comments on commit 65c7bdb

Please sign in to comment.