mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 12:22:47 +00:00 
			
		
		
		
	make is_administrator a property, add back db events
This commit is contained in:
		@@ -120,7 +120,7 @@
 | 
			
		||||
{% block modals %}
 | 
			
		||||
{{ super() }}
 | 
			
		||||
 | 
			
		||||
{% if current_user == corpus.user or current_user.is_administrator() %}
 | 
			
		||||
{% if current_user == corpus.user or current_user.is_administrator %}
 | 
			
		||||
<div class="modal" id="publishing-modal">
 | 
			
		||||
  <div class="modal-content">
 | 
			
		||||
    <h4>Change your Corpus publishing status</h4>
 | 
			
		||||
@@ -247,7 +247,7 @@
 | 
			
		||||
  });
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% if current_user == corpus.user or current_user.is_administrator() %}
 | 
			
		||||
{% if current_user == corpus.user or current_user.is_administrator %}
 | 
			
		||||
// #region Publishing
 | 
			
		||||
let publishingModalIsPublicSwitchElement = document.querySelector('#publishing-modal-is-public-switch');
 | 
			
		||||
publishingModalIsPublicSwitchElement.addEventListener('change', (event) => {
 | 
			
		||||
 
 | 
			
		||||
@@ -77,7 +77,7 @@
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="card-action right-align">
 | 
			
		||||
          {% if current_user.is_administrator()  %}
 | 
			
		||||
          {% if current_user.is_administrator %}
 | 
			
		||||
          <a class="action-button btn disabled waves-effect waves-light modal-trigger" data-action="get-log-request" id="job-log-button" href="#job-log-modal"><i class="material-icons left">text_snippet</i>Log</a>
 | 
			
		||||
          {% endif %}
 | 
			
		||||
          <a class="btn disabled waves-effect waves-light modal-trigger" href="#restart-job-modal"><i class="material-icons left">repeat</i>Restart</a>
 | 
			
		||||
@@ -159,7 +159,7 @@
 | 
			
		||||
      nopaque.requests.jobs.entity.restart({{ job.hashid|tojson }});
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  if ({{ current_user.is_administrator()|tojson }}) {
 | 
			
		||||
  if ({{ current_user.is_administrator|tojson }}) {
 | 
			
		||||
    let jobLogButtonElement = document.querySelector('#job-log-button');
 | 
			
		||||
    jobLogButtonElement.addEventListener('click', (event) => {
 | 
			
		||||
      nopaque.requests.jobs.entity.log({{ job.hashid|tojson }})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user