mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
update public corpora list on dashboard
This commit is contained in:
parent
91a800f7fd
commit
e03b54cfcd
@ -72,7 +72,7 @@ def corpus(corpus_id):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash('Your changes have been saved')
|
flash('Your changes have been saved')
|
||||||
return redirect(url_for('.corpus', corpus_id=corpus.id))
|
return redirect(url_for('.corpus', corpus_id=corpus.id))
|
||||||
if corpus.user == current_user or current_user.is_administrator():
|
if corpus.user == current_user:
|
||||||
return render_template(
|
return render_template(
|
||||||
'corpora/corpus.html.j2',
|
'corpora/corpus.html.j2',
|
||||||
corpus_settings_form=corpus_settings_form,
|
corpus_settings_form=corpus_settings_form,
|
||||||
|
14
app/static/js/ResourceLists/PublicCorpusList.js
Normal file
14
app/static/js/ResourceLists/PublicCorpusList.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
class PublicCorpusList extends CorpusList {
|
||||||
|
get item() {
|
||||||
|
return `
|
||||||
|
<tr class="list-item clickable hoverable">
|
||||||
|
<td><a class="btn-floating disabled"><i class="material-icons service-color darken" data-service="corpus-analysis">book</i></a></td>
|
||||||
|
<td><b class="title"></b><br><i class="description"></i></td>
|
||||||
|
<td><span class="status badge new corpus-status-color corpus-status-text" data-badge-caption=""></span></td>
|
||||||
|
<td class="right-align">
|
||||||
|
<a class="list-action-trigger btn-floating service-color darken waves-effect waves-light" data-list-action="view" data-service="corpus-analysis"><i class="material-icons">send</i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
`.trim();
|
||||||
|
}
|
||||||
|
}
|
@ -22,6 +22,7 @@
|
|||||||
'js/ResourceLists/CorpusFileList.js',
|
'js/ResourceLists/CorpusFileList.js',
|
||||||
'js/ResourceLists/PublicCorpusFileList.js',
|
'js/ResourceLists/PublicCorpusFileList.js',
|
||||||
'js/ResourceLists/CorpusList.js',
|
'js/ResourceLists/CorpusList.js',
|
||||||
|
'js/ResourceLists/PublicCorpusList.js',
|
||||||
'js/ResourceLists/JobList.js',
|
'js/ResourceLists/JobList.js',
|
||||||
'js/ResourceLists/JobInputList.js',
|
'js/ResourceLists/JobInputList.js',
|
||||||
'js/ResourceLists/JobResultList.js',
|
'js/ResourceLists/JobResultList.js',
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
<script>
|
<script>
|
||||||
let userList = new UserList(document.querySelector('.user-list'));
|
let userList = new UserList(document.querySelector('.user-list'));
|
||||||
userList.add({{ users|tojson }});
|
userList.add({{ users|tojson }});
|
||||||
let publicCorpusList = new CorpusList(document.querySelector('.public-corpus-list'));
|
let publicCorpusList = new PublicCorpusList(document.querySelector('.public-corpus-list'));
|
||||||
publicCorpusList.add({{ corpora|tojson }});
|
publicCorpusList.add({{ corpora|tojson }});
|
||||||
</script>
|
</script>
|
||||||
{% endblock scripts %}
|
{% endblock scripts %}
|
||||||
|
Loading…
Reference in New Issue
Block a user