<commit_before>{% extends "tardis_portal/portal_template.html" %}
{% load facility_tags %}

{% block content %}
{% with request|check_if_facility_manager as facility_manager %}
{% if not facility_manager %}
<div class="alert alert-block alert-error">
<span class="message">You don't manage any facilities!</span>
</div>
{% endif %}{% endwith %}
{% endblock content %}<commit_msg>used my_data as a base for facility_overview view<commit_after>{% extends "tardis_portal/portal_template.html" %}
{% load facility_tags %}
{% load experiment_tags %}
{% load experimentstats %}
{% load humanize %}
{% load bleach_tag %}

{% block content %}
{% with request|check_if_facility_manager as facility_manager %}
{% if not facility_manager %}
<div class="alert alert-block alert-error">
<span class="message">You don't manage any facilities!</span>
</div>
{% endif %}{% endwith %}

<div id="content">
  <div class="row-fluid">
    <div class="span7">
      <h2 class="visible-phone">Experiments</h2>
      <div class="pull-right">
        <a class="btn btn-primary"
           href="{% url 'tardis.tardis_portal.views.search_experiment' %}">
          <i class="icon-search"></i>
          Search
        </a>
      </div>
      <div class="pull-left">
	<h2 class="hidden-phone" style="text-align: center">Experiments</h2>
      </div>
    </div>
  </div>
  <div class="row-fluid">
    <div class="span7">

      {% if experiments %}
      <div class="pull-left">
	<h3><strong>{{ experiments.count }}</strong>
	Experiment{{ experiments.count|pluralize}}
	</h3>
      </div>
      <div class="pull-right">
	<button class="btn btn-success btn-mini"
		onclick="$('#myowned .accordion-body').collapse('hide');" >
	Collapse all</button>
	<button class="btn btn-success btn-mini"
		onclick="$('#myowned .accordion-body').collapse('show');" >
	Expand all</button>
      </div>
      <div class="clearfix"></div>
      <div id="myowned" class="mydata accordion">
	{% for exp in experiments %}
	  <div class="accordion-group">
	    <div class="accordion-heading">
	      <div class="accordion-toggle" data-toggle="collapse"
		   onclick="$('#collapse{{exp.id}}').collapse('toggle');" >
		<strong><a class="pull-left explink"
			   href="{% url 'tardis.tardis_portal.views.view_experiment' exp.id %}">{{ exp.title }}</a></strong>
		<ul class="nav nav-pills badgelist">
		  <li class="pull-right">
		    {{ exp|experiment_public_access_badge }}
		  </li>
		  <li class="pull-right">
		    {{ exp|experiment_datafiles_badge }}
		  </li>
		  <li class="pull-right">
		    {{ exp|experiment_datasets_badge }}
		  </li>
		  <li class="pull-right">
		    {{ exp|experiment_last_updated_badge }}
		  </li>
		</ul>
		<small>
		  {% for author in exp.author_experiment_set.all %}{% if not forloop.first %},
		{% endif %}
		<span property="dc:author">{{ author.author }}</span>{% empty %}&nbsp;{% endfor %}
		</small>
		<span class="pull-right">
		  {% for dltype, dlurl in exp.get_download_urls.items %}
		    {% if forloop.first %}
		      <a class="dllink" href="{{dlurl}}"
			 title="Download Entire Experiment as {{dltype}}">
			<i class="icon-download-alt"></i>
			<em>Download data as .{{dltype}}</em>
		      </a>
		    {% endif %}
		  {% endfor %}
		</span>
	      </div>
	    </div>
	    <div id="collapse{{exp.id}}"
		 class="accordion-body collapse in">
	      <div class="accordion-inner">
		<p>{{exp.description|default:""|bleach}}</p>
		{% for ds in exp.datasets.all|dictsortreversed:"id"|slice:":1" %}
		  {% if forloop.first %}
		    <ul class="nav nav-list">
		      <li class="nav-header dataset-list-header">Latest dataset in this experiment</li>
		  {% endif %}
		  <li>
		    <a href="{% url 'tardis.tardis_portal.views.view_dataset' ds.id %}"><strong>{{ ds.description }}</strong></a>
		    {% for datafile in ds.get_images|slice:":5" %}
		      {% if forloop.first %}
			<ul class="thumbnails">
		      {% endif %}
		      <li>
			<a class="thumbnail" href="{% url 'tardis.tardis_portal.download.view_datafile' datafile.id %}">{% url 'tardis.tardis_portal.iiif.download_image' datafile_id=datafile.id region='full' size=',50' rotation=0 quality='native' format='jpg' as thumbnail %}
			<img alt="Thumbnail for Datafile #{{datafile.id}}"
			     src="{{ thumbnail }}"
			     onerror="$(this).hide()"/></a>
		      </li>
		      {% if forloop.last %}
			</ul>
		      {% endif %}
		    {% endfor %}
		  </li>
		  {% if forloop.last %}
		    </ul>
		  {% endif %}
		  {% empty %}
		  There are no datasets in this experiment
		{% endfor %}
	      </div>
	    </div>
	  </div>
	  {% empty %}
	  <p>You do not own any Experiment on this server.<br/>
	  <a href="{% url 'tardis.tardis_portal.views.create_experiment' %}">Create
	  a new experiment</a> and upload your data</p>
	{% endfor %}
      </div>
      <br/>
    {% endif %}

</div>
<script type="text/javascript">
$(function(){
    $("#experiments .accordion-body").collapse({parent:"#experiments", toggle: true});
    $(".explink").click(function(e){
	e.stopPropagation();
    });
    $(".dllink").click(function(e){
	e.stopPropagation();
    });
});
</script>
{% endblock %}
{'fraction_non_alphanumeric': 0.1943359375, 'fraction_numerical': 0.0025390625, 'mean_word_length': 3.3620102214650767, 'pattern_counts': {'":': 2, '<': 110, '<?xml version=': 0, '>': 110, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1565543', 'n_tokens_mistral': 1971, 'n_tokens_neox': 1716, 'n_words': 360}