Skip to content
Snippets Groups Projects
Commit 2d4559e4 authored by Stephan Porada's avatar Stephan Porada :speech_balloon:
Browse files

Show buttons only on wanted status

parent da077cae
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,12 @@
statusElement.classList.remove(...Object.values(CorpusList.STATUS_COLORS));
statusElement.classList.add(CorpusList.STATUS_COLORS[status] || CorpusList.STATUS_COLORS['default']);
statusElement.innerText = status;
if (status === 'prepared') {
var analyseBtn = document.getElementById('analyse');
analyseBtn.classList.remove('hide');
var prepareBtn = document.getElementById('prepare');
prepareBtn.classList.add('hide')
}
}
}
......@@ -87,11 +93,9 @@
</div>
</div>
<div class="card-action right-align">
{% if corpus.status == 'prepared' %}
<a href="{{ url_for('corpora.corpus_analysis', corpus_id=corpus.id) }}" class="waves-effect waves-light btn"><i class="material-icons left">help</i>Analyse</a>
{% endif %}
<a href="{{ url_for('corpora.corpus_analysis', corpus_id=corpus.id) }}" class="waves-effect waves-light btn hide" id="analyse"><i class="material-icons left">help</i>Analyse</a>
{% if corpus.files[0] is defined %}
<a href="{{ url_for('corpora.prepare_corpus', corpus_id=corpus.id) }}" class="waves-effect waves-light btn"><i class="material-icons left">whatshot</i>Prepare</a>
<a href="{{ url_for('corpora.prepare_corpus', corpus_id=corpus.id) }}" class="waves-effect waves-light btn" id="prepare"><i class="material-icons left">whatshot</i>Prepare</a>
{% endif %}
<a data-target="delete-corpus-modal" class="waves-effect waves-light btn red modal-trigger"><i class="material-icons left">delete</i>Delete Corpus</a>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment