mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development
This commit is contained in:
		@@ -15,8 +15,9 @@
 | 
			
		||||
        <li>Username: {{ user.username }}</li>
 | 
			
		||||
        <li>Email: {{ user.email }}</li>
 | 
			
		||||
        <li>ID: {{ user.id }}</li>
 | 
			
		||||
        <li>Registration date: {{ user.registration_date.strftime('%m/%d/%Y, %H:%M:%S %p') }}</li>
 | 
			
		||||
        <li>Member sinse: {{ user.member_since.strftime('%m/%d/%Y, %H:%M:%S %p') }}</li>
 | 
			
		||||
        <li>Confirmed status: {{ user.confirmed }}</li>
 | 
			
		||||
        <li>Last seen: {{ user.last_seen.strftime('%m/%d/%Y, %H:%M:%S %p') }}</li>
 | 
			
		||||
        <li>Role ID: {{ user.role_id }}</li>
 | 
			
		||||
        <li>Permissions as Int: {{ user.role.permissions }}</li>
 | 
			
		||||
        <li>Role name: {{ user.role.name }}</li>
 | 
			
		||||
 
 | 
			
		||||
@@ -175,7 +175,6 @@
 | 
			
		||||
 | 
			
		||||
      for (let operation of patch) {
 | 
			
		||||
        /* "/jobId/valueName" -> ["jobId", "valueName"] */
 | 
			
		||||
        console.log(operation.value);
 | 
			
		||||
        pathArray = operation.path.split("/").slice(1);
 | 
			
		||||
        if (pathArray[0] != this.jobId) {continue;}
 | 
			
		||||
        switch(operation.op) {
 | 
			
		||||
 
 | 
			
		||||
@@ -29,12 +29,15 @@
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro render_boolean_field(field) %}
 | 
			
		||||
  {% set label = kwargs.pop('label', True) %}
 | 
			
		||||
  <div class="switch">
 | 
			
		||||
    {% if 'material_icon' in kwargs %}
 | 
			
		||||
      <i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    <label>
 | 
			
		||||
      {% if label %}
 | 
			
		||||
      {{ field.label.text }}
 | 
			
		||||
      {% endif %}
 | 
			
		||||
      {{ field(*args, **kwargs) }}
 | 
			
		||||
      <span class="lever"></span>
 | 
			
		||||
    </label>
 | 
			
		||||
@@ -44,12 +47,6 @@
 | 
			
		||||
  </div>
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro render_decimal_range_field(field) %}
 | 
			
		||||
  <p class="range-field">
 | 
			
		||||
    {{ field(*args, **kwargs) }}
 | 
			
		||||
  </p>
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro render_file_field(field) %}
 | 
			
		||||
  {% set placeholder = kwargs.pop('placeholder', '') %}
 | 
			
		||||
  <div class="file-field input-field">
 | 
			
		||||
@@ -64,12 +61,15 @@
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
{% macro render_generic_field(field) %}
 | 
			
		||||
  {% set label = kwargs.pop('label', True) %}
 | 
			
		||||
  <div class="input-field">
 | 
			
		||||
    {% if 'material_icon' in kwargs %}
 | 
			
		||||
      <i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {{ field(*args, **kwargs) }}
 | 
			
		||||
    {% if label %}
 | 
			
		||||
    {{ field.label }}
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% for error in field.errors %}
 | 
			
		||||
      <span class="helper-text red-text">{{ error }}</span>
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
 
 | 
			
		||||
@@ -49,9 +49,15 @@
 | 
			
		||||
    <script src="{{ url_for('static', filename='js/nopaque.js') }}"></script>
 | 
			
		||||
    <script src="{{ url_for('static', filename='js/nopaque.lists.js') }}"></script>
 | 
			
		||||
    <script>
 | 
			
		||||
      nopaque.user.isAuthenticated = {{ current_user.is_authenticated|tojson }};
 | 
			
		||||
      nopaque.user.settings.darkMode = {{ (current_user.is_authenticated and current_user.setting_dark_mode)|tojson }};
 | 
			
		||||
      nopaque.flashedMessages = {{ get_flashed_messages(with_categories=true)|tojson }};
 | 
			
		||||
      {% if current_user.is_authenticated %}
 | 
			
		||||
      nopaque.user.isAuthenticated = true;
 | 
			
		||||
      nopaque.user.settings.darkMode = {{ current_user.setting_dark_mode|tojson }};
 | 
			
		||||
      nopaque.user.settings.jobStatusMailNotifications = {{ current_user.setting_job_status_mail_notifications|tojson }};
 | 
			
		||||
      nopaque.user.settings.jobStatusSiteNotifications = {{ current_user.setting_job_status_site_notifications|tojson }};
 | 
			
		||||
      {% else %}
 | 
			
		||||
      nopaque.user.isAuthenticated = false;
 | 
			
		||||
      {% endif %}
 | 
			
		||||
      nopaque.flashedMessages = {{ get_flashed_messages(with_categories=True)|tojson }};
 | 
			
		||||
    </script>
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
 
 | 
			
		||||
@@ -16,27 +16,27 @@
 | 
			
		||||
            <p class="light">Activate dark mode to ease your eyes.</p>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="col s3 right-align">
 | 
			
		||||
            <div class="switch">
 | 
			
		||||
              <label>
 | 
			
		||||
                {{ edit_general_settings_form.dark_mode() }}
 | 
			
		||||
                <span class="lever"></span>
 | 
			
		||||
              </label>
 | 
			
		||||
            </div>
 | 
			
		||||
            {{ M.render_field(edit_general_settings_form.dark_mode, label=False) }}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="col s12"><p> </p></div>
 | 
			
		||||
          <div class="col s12 divider"></div>
 | 
			
		||||
          <div class="col s12"><p> </p></div>
 | 
			
		||||
          <div class="col s9">
 | 
			
		||||
            <p><i class="material-icons left">notifications</i>Email notifications</p>
 | 
			
		||||
            <p class="light">Receive emails when a job completes.</p>
 | 
			
		||||
          <div class="col s12 m8">
 | 
			
		||||
            <p><i class="material-icons left">notifications</i>Job status site notifications</p>
 | 
			
		||||
            <p class="light">Receive site notifications about job status changes.</p>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="col s3 right-align">
 | 
			
		||||
            <div class="switch">
 | 
			
		||||
              <label>
 | 
			
		||||
                <input disabled type="checkbox">
 | 
			
		||||
                <span class="lever"></span>
 | 
			
		||||
              </label>
 | 
			
		||||
            </div>
 | 
			
		||||
          <div class="col s12 m4 right-align">
 | 
			
		||||
            {{ M.render_field(edit_general_settings_form.job_status_site_notifications, label=False) }}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="col s12"><p> </p></div>
 | 
			
		||||
          <div class="col s12 divider"></div>
 | 
			
		||||
          <div class="col s12"><p> </p></div>
 | 
			
		||||
          <div class="col s12 m8">
 | 
			
		||||
            <p><i class="material-icons left">notifications</i>Job status mail notifications</p>
 | 
			
		||||
            <p class="light">Receive mail notifications about job status changes.</p>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="col s12 m4 right-align">
 | 
			
		||||
            {{ M.render_field(edit_general_settings_form.job_status_mail_notifications, label=False) }}
 | 
			
		||||
          </div>
 | 
			
		||||
          <!--
 | 
			
		||||
          Seperate each setting with the following two elements
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user