Skip to content

Commit

Permalink
Version 1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
filak committed Apr 12, 2019
1 parent 75b206f commit a319c61
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 28 deletions.
3 changes: 2 additions & 1 deletion flask-app/mtw/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __call__(self, environ, start_response):

app.config.update(dict(
APP_NAME = 'MTW',
APP_VER = '1.2.8',
APP_VER = '1.2.9',
API_VER = '1.0.0',
APP_URL = '/mtw',
DEFAULT_THEME = 'slate',
Expand Down Expand Up @@ -837,6 +837,7 @@ def audit(dui, cui):
@app.route(getPath('/approve/event:<event>'), defaults={'userid': '', 'username': '', 'status': ''}, methods=['GET'])
@app.route(getPath('/approve/event:<event>/userid:<userid>/user:<username>'), defaults={'status': ''}, methods=['GET'])
@app.route(getPath('/approve/status:<status>/event:<event>'), defaults={'userid': '', 'username': ''}, methods=['GET'])
@app.route(getPath('/approve/status:<status>/event:<event>/userid:<userid>'), defaults={'username': ''}, methods=['GET'])
@app.route(getPath('/approve/userid:<userid>'), defaults={'username': '', 'status': '', 'event': ''}, methods=['GET'])
@app.route(getPath('/approve/userid:<userid>/user:<username>'), defaults={'status': '', 'event': ''}, methods=['GET'])
@app.route(getPath('/approve/userid:<userid>/user:<username>/status:<status>'), defaults={'event': ''}, methods=['GET'])
Expand Down
2 changes: 1 addition & 1 deletion flask-app/mtw/templates/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h6>
</div>
<div class="col-lg-7 col-md">

<h4 class="mb-4">Stats for {{ config.TARGET_YEAR }} <small><a href="{{ url_for('todo', tlist='duplicates') }}" class="text-warning">Duplicate terms check</a></small>
<h4 class="mb-4">Stats for {{ config.TARGET_YEAR }} <small><a href="{{ url_for('todo', tlist='duplicates') }}" class="text-warning" title="Check regularly!">Duplicate terms check</a></small>
</h4>

{% if show_stats %}
Expand Down
2 changes: 1 addition & 1 deletion flask-app/mtw/templates/modals/add-concept.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set item_cui = 'NEW' %}

<div class="modal fade conceptModal" id="editConcept-{{ item_cui }}" tabindex="-1" role="dialog" aria-labelledby="Add Concept" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ descriptor['labels']['en'] }}
Expand Down
2 changes: 1 addition & 1 deletion flask-app/mtw/templates/modals/edit-concept.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set item_cui = item['cui'] %}

<div class="modal fade conceptModal" id="editConcept-{{ item['cui'] }}" tabindex="-1" role="dialog" aria-labelledby="edit Concept" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ descriptor['labels']['en'] }}
Expand Down
5 changes: 4 additions & 1 deletion flask-app/mtw/templates/modals/edit-terms.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% for term in terms %}

{% set termId = random_id() %}
{% if term['tpid'] %}
{% set term_state = ' is-valid' %}
{% endif %}

<input type="hidden"
name="term{{ termId }}___rowid"
Expand All @@ -17,7 +20,7 @@
<div class="form-row termRow" id="{{ termInputRow }}">
<div class="col-7">
<label class="sr-only" for="termInput-{{ termId }}">Term</label>
<input type="text" class="form-control form-control-lg mb-2 termInput formInputChanged" id="termInput-{{ termId }}"
<input type="text" class="form-control form-control-lg mb-2 termInput formInputChanged {{ term_state }}" id="termInput-{{ termId }}"
data-formchanged="#formchanged-{{ item_cui }}"
name="term{{ termId }}___prefLabel"
maxlength="250" placeholder="{{ input_hint }}" value="{{ term['prefLabel'] }}" {{ input_required }}>
Expand Down
11 changes: 4 additions & 7 deletions flask-app/mtw/templates/modals/update-audit.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,15 @@ <h4 class="card-title text-center">OLD | NEW</h4>
</div>

<div class="row mb-2">
<div class="col-6 text-right" id="historyScntOld">
<div class="col-6" id="historyScntOld">
</div>
<div class="col-6 text-left" id="historyScntNew">
</div>
</div>

<div class="row mb-4">

<div class="row mb-2">
<div class="col-6 text-right" id="historyScnOld">
</div>
<div class="col-6 text-left" id="historyScnNew">
</div>
</div>
</div>

{% if session.ugroup in ('admin','manager','editor') %}
<div class="form-group" id="noteAuditComment">
Expand Down
17 changes: 11 additions & 6 deletions flask-app/mtw/templates/snips/approve-users.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<li>
<h6>
<a href="{{ url_for('approve', status=status, userid=user.userid, username=uname, event=event) }}" class="{{ user_selected }}">

<h6>
{% if not uname %}
{% set uname = 'userid_' + user.userid|string %}
{% set group = 'deleted' %}
{% endif %}

{% if user_icon %}
<i class="fas fa-chevron-circle-right"></i>
{% endif %}

{% endif %}

<a href="{{ url_for('approve', status=status, userid=user.userid, username=uname, event=event) }}" class="{{ user_selected }}">
{{ uname }}
<span class="badge badge-{{ get_userBadgeRep(group) }}">{{ group }}</span>
<span class="badge badge-{{ get_statusRep(status) }} badge-pill"> {{ user.cnt }} </span>
</a>
</h6>
</li>
</li>

2 changes: 1 addition & 1 deletion flask-app/mtw/templates/snips/report-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h4>Events</h4>
{% if item.username %}
{% set uname = item.username %}
{% else %}
{% set uname = 'Admin' %}
{% set uname = 'userid_' + item.userid|string %}
{% endif %}
{{ uname }}
</td>
Expand Down
10 changes: 5 additions & 5 deletions flask-app/mtw/templates/snips/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

<li class="pb-1 {{ term_class }} {{ term_text }}" data-ttype="{{ term['ttype'] }}">
{{ term['prefLabel'] }}

{% if term['lexicalTag'] != 'NON' %}
<span class="font-weight-light text-info"> {{ term['lexicalTag'] }} </span>
{% endif %}

{% if term['tpid'] %}
<span class="text-muted term">{{ term['tpid'] }}</span>
{% endif %}

{% if term['lexicalTag'] != 'NON' %}
<span class="font-weight-light text-muted">{{ term['lexicalTag'] }}</span>
<span class="text-muted term font-weight-normal"><small> {{ term['tpid'] }} </small></span>
{% endif %}

{% if term['altLabel'] %}
Expand Down
2 changes: 1 addition & 1 deletion flask-app/mtw/templates/sparql/descriptor_view_trx.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ WHERE {
mesh:{{ query }} ?p ?id .
?id rdfs:label ?val
FILTER(!isLiteral(?id))
FILTER(?p not in (meshv:allowableQualifier))
FILTER(?p not in (meshv:allowableQualifier,meshv:treeNumber))
BIND(STR(?val) AS ?o)
}} UNION {
SELECT ?p ?o
Expand Down
5 changes: 3 additions & 2 deletions flask-app/mtw_utils/mtw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,9 @@ def getMarc(lookups, export, params):
if xnote.get('pm'):
msh += fw + '$p' + fw + xnote.get('pm')

if item.get('rn'):
msh += fw + '$r' + fw + item.get('rn')
if item.get('rn','0'):
if rn != '0':
msh += fw + '$r' + fw + item.get('rn')

if item.get('cas'):
msh += fw + '$s' + fw + item.get('cas')
Expand Down
Binary file modified screenshots/mtw-man-custom-concept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mtw-man-edit-concept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mtw-man-manage-exports.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mtw-man-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sparql/query_descriptor_view_trx.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ WHERE {
mesh:D009369 ?p ?id .
?id rdfs:label ?val
FILTER(!isLiteral(?id))
FILTER(?p not in (meshv:allowableQualifier))
FILTER(?p not in (meshv:allowableQualifier,meshv:treeNumber))
BIND(STR(?val) AS ?o)
}} UNION {
SELECT ?p ?o
Expand Down

0 comments on commit a319c61

Please sign in to comment.