Skip to content
software.html 3.48 KiB
Newer Older
{% load static %} 
{% include "header.html" %}
{% include "logo.html" %}

<div class="container">
  <div class="dashboard">
    <div class="span8 offset2">
      {% if data.container_families %}
      <h1><a href="/software">Software containers</a> <span style="font-size:18px"> / {{ data.containers.0.name }}</span></h1>
      {% else %}      
      <h1><a href="/software">Software containers</a> <span style="font-size:18px"> / <a href="/software/?container_family_id={{data.container.family_id}}&details=True">{{ data.container.name }}</a> / {{ data.container.image_tag}}</span></h1>
      {% if data.mode == 'new_task' %}
Stefano Alberto Russo's avatar
Stefano Alberto Russo committed
      <h1>New Task</h1>
      <div style="padding-left:10px; padding-top:1px"><h4>Software container</h4></div>
      <h1>Software containers</h1>

      
      
      <div class="form-filter" style="margin-bottom:20px">
        <form action="" method="POST">
          
          <input type="hidden" name="mode" value="{{data.mode}}">
                    
          <input type="text" class="form-control" id="search_text" name="search_text" placeholder="Search..." style="width:200px; margin:0; display:inline" value="{{data.search_text}}" autofocus>

          <!-- onchange="this.form.submit()"  -->
          <select class="form-control" id="search_owner" name="search_owner" style="width:120px; margin:0; display:inline">
            {% if data.search_owner == 'All' %}
            <option selected>All</option>
            {% else %}
            <option>All</option>            
            {% endif %}
            
            {% if data.search_owner == 'Platform' %}
            <option selected>Platform</option>
            {% if data.search_owner == 'User' %}
            <option selected>User</option>
            {% endif %}
            
          </select>
          {% csrf_token %}
          <button type="submit" class="btn btn-secondary">Go</button>
          
          &nbsp; &nbsp; <font size=4.0em>|</font> &nbsp; <a href="/add_software">Add new...</a>
          
      {% include "components/container.html" with container=data.container details=True %}
      {% else %}     
      {% if data.container_families %}
      {% for container_family_id, container_family in data.container_families.items %}
      {% include "components/container_family.html" with container_family=container_family container_family_id=container_family_id%}
      {% endfor %}
      {% else %}
      {% include "components/container.html" with container=container %}
$(document).ready(function() {
	  
    var search_text_input = $("#search_text");
    var len = search_text_input.val().length;
    search_text_input[0].focus();
    search_text_input[0].setSelectionRange(len, len);

});
</script>