mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Change file download view.
This commit is contained in:
		@@ -110,8 +110,9 @@ def job(job_id):
 | 
				
			|||||||
            files[file]['results'] = {}
 | 
					            files[file]['results'] = {}
 | 
				
			||||||
            results_dir = os.path.join(dir, 'output', file)
 | 
					            results_dir = os.path.join(dir, 'output', file)
 | 
				
			||||||
            for result in os.listdir(results_dir):
 | 
					            for result in os.listdir(results_dir):
 | 
				
			||||||
                files[file]['results'][result] = {}
 | 
					                result_type = result.rsplit(".", 1)[1]
 | 
				
			||||||
                files[file]['results'][result]['path'] = os.path.join(
 | 
					                files[file]['results'][result_type] = {}
 | 
				
			||||||
 | 
					                files[file]['results'][result_type]['path'] = os.path.join(
 | 
				
			||||||
                    'output', files[file]['path'], result
 | 
					                    'output', files[file]['path'], result
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -161,28 +161,33 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <span class="card-title">Input files</span>
 | 
					      <table>
 | 
				
			||||||
      <p>
 | 
					        <thead>
 | 
				
			||||||
      {% for file in files %}
 | 
					          <tr>
 | 
				
			||||||
      <a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['path']) }}" class="waves-effect waves-light btn-small">
 | 
					              <th>Inputs</th>
 | 
				
			||||||
        <i class="material-icons left">file_download</i>{{ file }}
 | 
					              <th>Results</th>
 | 
				
			||||||
      </a>
 | 
					          </tr>
 | 
				
			||||||
      {% endfor %}
 | 
					        </thead>
 | 
				
			||||||
      </p>
 | 
					        <tbody>
 | 
				
			||||||
 | 
					          {% for file in files %}
 | 
				
			||||||
      {% if job.status == 'complete' %}
 | 
					          <tr>
 | 
				
			||||||
      <p> </p>
 | 
					            <td>
 | 
				
			||||||
      <span class="card-title">Results</span>
 | 
					              <a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['path']) }}" class="waves-effect waves-light btn-small">{{ file }}</a>
 | 
				
			||||||
      <p>
 | 
					            </td>
 | 
				
			||||||
        {% for file in files %}
 | 
					            <td>
 | 
				
			||||||
        {% for result in files[file]['results'] %}
 | 
					              {% if job.status == 'complete' %}
 | 
				
			||||||
        <a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['results'][result]['path']) }}" class="waves-effect waves-light btn-small">
 | 
					              {% for result in files[file]['results'] %}
 | 
				
			||||||
          <i class="material-icons left">file_download</i>{{ result }}
 | 
					              <a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['results'][result]['path']) }}" class="waves-effect waves-light btn-small">{{ result }}</a>
 | 
				
			||||||
        </a>
 | 
					              {% endfor %}
 | 
				
			||||||
        {% endfor %}
 | 
					              {% else %}
 | 
				
			||||||
        {% endfor %}
 | 
					              None
 | 
				
			||||||
      </p>
 | 
					              {% endif %}
 | 
				
			||||||
      {% endif %}
 | 
					            </td>
 | 
				
			||||||
 | 
					          </tr>
 | 
				
			||||||
 | 
					          {% endfor %}
 | 
				
			||||||
 | 
					        </tbody>
 | 
				
			||||||
 | 
					      </table>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user