Remove more UI leftovers from community update

This commit is contained in:
Patrick Jentsch 2023-02-15 11:30:27 +01:00
parent 23cdfb1441
commit dcdb71ac74
3 changed files with 19 additions and 14 deletions

View File

@ -27,15 +27,20 @@ def faq():
@bp.route('/dashboard') @bp.route('/dashboard')
@login_required @login_required
def dashboard(): def dashboard():
users = [ # users = [
u.to_json_serializeable(filter_by_privacy_settings=True) for u # u.to_json_serializeable(filter_by_privacy_settings=True) for u
in User.query.filter(User.is_public == True, User.id != current_user.id).all() # in User.query.filter(User.is_public == True, User.id != current_user.id).all()
] # ]
corpora = [ # corpora = [
c.to_json_serializeable() for c # c.to_json_serializeable() for c
in Corpus.query.filter(Corpus.is_public == True, Corpus.user != current_user).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) return render_template(
'main/dashboard.html.j2',
title='Dashboard',
# users=users,
# corpora=corpora
)
@bp.route('/dashboard2') @bp.route('/dashboard2')

View File

@ -14,7 +14,7 @@
<a class="action-button btn waves-effect waves-light" data-action="unfollow-request"><i class="material-icons left">add</i>Unfollow Corpus</a> <a class="action-button btn waves-effect waves-light" data-action="unfollow-request"><i class="material-icons left">add</i>Unfollow Corpus</a>
{% endif %} {% endif %}
{% if corpus.status.name in ['BUILT', 'STARTING_ANALYSIS_SESSION', 'RUNNING_ANALYSIS_SESSION', 'CANCELING_ANALYSIS_SESSION'] and current_user.is_following_corpus(corpus) %} {% 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 %} {% endif %}
</div> </div>
</div> </div>

View File

@ -42,7 +42,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col s12" id="social"> {# <div class="col s12" id="social">
<h3>Social</h3> <h3>Social</h3>
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
@ -58,7 +58,7 @@
<div class="public-corpus-list no-autoinit"></div> <div class="public-corpus-list no-autoinit"></div>
</div> </div>
</div> </div>
</div> </div> #}
</div> </div>
</div> </div>
{% endblock page_content %} {% endblock page_content %}
@ -116,11 +116,11 @@
{% block scripts %} {% block scripts %}
{{ super() }} {{ super() }}
<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 PublicCorpusList(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 %}