mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Share link expiration update and small fixes
This commit is contained in:
parent
1767ceee01
commit
8595e2a203
@ -76,6 +76,7 @@ def corpus(corpus_id):
|
||||
return redirect(url_for('.corpus', corpus_id=corpus.id))
|
||||
now = datetime.utcnow()
|
||||
payload = {
|
||||
'exp': now + timedelta(weeks=1),
|
||||
'iat': now,
|
||||
'iss': current_app.config['SERVER_NAME'],
|
||||
'sub': corpus.hashid
|
||||
|
@ -33,7 +33,7 @@ def dashboard():
|
||||
]
|
||||
corpora = [
|
||||
c.to_json_serializeable() for c
|
||||
in Corpus.query.filter(Corpus.is_public == True).all()
|
||||
in Corpus.query.filter(Corpus.is_public == True, Corpus.user != current_user).all()
|
||||
]
|
||||
return render_template('main/dashboard.html.j2', title='Dashboard', users=users, corpora=corpora)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
{% endif %}
|
||||
</a>
|
||||
{% if corpus.status.name in ['BUILT', 'STARTING_ANALYSIS_SESSION', 'RUNNING_ANALYSIS_SESSION', 'CANCELING_ANALYSIS_SESSION'] and current_user.is_following_corpus(corpus) %}
|
||||
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.analyse_corpus', corpus_id=corpus.id) }}">Analyse</a>
|
||||
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.analyse_corpus', corpus_id=corpus.id) }}">Analyze</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -44,12 +44,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if current_user.is_following_corpus(corpus) %}
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title" id="files">Corpus files</span>
|
||||
<div class="corpus-file-list no-autoinit" data-user-id="{{ corpus.user.hashid }}" data-corpus-id="{{ corpus.hashid }}"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,8 +61,10 @@
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
{% if current_user.is_following_corpus(corpus) %}
|
||||
let corpusFileList = new PublicCorpusFileList(document.querySelector('.corpus-file-list'));
|
||||
corpusFileList.add({{ corpus_files|tojson }});
|
||||
{% endif %}
|
||||
|
||||
let corpusFollowingRequest = document.querySelector('#follow-corpus-request');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user