Source

freieit / freieit / templates / home.html

{% extends "base.html" %}
{% load static %}
{% load i18n %}

{% block html_header %}
<script type="text/javascript">
  function mehr (e) {    
    var p = e.parentNode.parentNode.parentNode;
    if (p.className == "mehr") {
      p.className = "";
      e.title = "{% trans "mehr Infos anzeigen" %}";
      e.childNodes[3].innerHTML = "{% trans "mehr..." %}";
    } else {
      p.className = "mehr";
      e.title = "{% trans "weniger Infos anzeigen" %}";
      e.childNodes[3].innerHTML = "{% trans "weniger" %}";
    }
  }

  function do_by_class(classname, func) {
    var elems = document.getElementsByTagName('*'), i;
    for (i in elems) {
      if ((' ' + elems[i].className + ' ').indexOf(' ' + classname + ' ') > -1) {
            func(elems[i]);
      }
    }
  }
</script>
{% endblock html_header %}

{% block header %}
<h1>{% trans "Finden Sie Fachkräfte für"%} 
  <a href="http://fsfe.org/about/basics/freesoftware.de.html" 
     title="{% trans "Was ist Freie Software?" %}">
    {% trans "Freie Software" %}
  </a>! 
</h1>
{% endblock header %}

{% block content %}

<form id="suche" action="." method="get">
  {{ form.as_plain }}      
  
  <button type="submit" title="{% trans "jetzt suchen" %}">
    <img src="{% static "img/fit/lupe.png" %}" alt="{% trans "lupe" %}" />
  </button>

  <div>
    <strong>Suchvorschläge:</strong>
    {% for tag in tags %}
    <a  href="/?q={{tag}}">{{tag}}</a>
    {% endfor %}
  </div>
</form>
  <header>
    <h2><strong>{{ page.paginator.count }}</strong> 
      {% trans "Passende Fachkräfte:" %}
    </h2>
  </header>


<section>

  {% for result in page %}
    <div class="mehr">
      <header>
	<h2><a class="person" onclick="mehr(this);" 
	       title="{% trans "mehr Infos anzeigen" %}">
	    {% if result.object.image %}
	    <img src="{{ result.object.image.url }}" 
		 alt="{{ result.object.name }}" 
		 width="60" height="60"/>
	    {% endif %}
	    {{ result.object.name }}

	    <div class="labelmore"></div>
	   </a>
	  
	</h2>
      </header>
      <p>
	<strong>{{ result.object.services }}</strong>
	</br>
	{{ result.object.postcode }} {{ result.object.city }}, {{ result.object.country }}
      </p>
      {% if result.object.description %}
      <p class="descr">
        {{ result.object.description|linebreaksbr }}
      </p>
      {% endif %}
      <dl>
	{% for link in result.object.link_set.all %}
	  <dt>{{ link.label }}</dt>
	  <dd>
	    
	  {% if link.label == "WWW" %}<a href="{{ link.url }}" target="new_"> {{ link.url }}</a>
	  {% else%}	      
	    {% if link.label == "MAIL" %}<a href="mailto:{{ link.url }}"> {{ link.url }}</a>
	    {% else%}	      
	      {% if link.label == "MOBILE" or link.label == "TEL" %}<a href="tel:{{ link.url }}"> {{ link.url }}</a>
              {% else%}
  	        {% if link.label == "XING" %}<a href="http://www.xing.com/profile/{{ link.url }}" target="new_"> {{ link.url }}</a>
		{% else%}
		  {% if link.label == "LINKEDIN" %}<a href="https://www.linkedin.com/pub/{{ link.url }}" target="new_"> {{ link.url }}</a>
		  {% else%}
		    {% if link.label == "XMPP" %}<a href="xmpp:{{ link.url }}">{{ link.url }}</a>
         	    {% else%}	
          	      {% if link.label == "SIP" %}<a href="sip:{{ link.url }}">{{ link.url }}</a>
		      {% else%}
 		         {{ link.url }}
                      {% endif %}
		    {% endif %}
                  {% endif %}
		{% endif %}
	      {% endif %}
            {% endif %}
          {% endif %}	  
	  </dd>
	{% endfor %}

	<dt>{% trans "Stundensatz" %}</dt><dd>{{ result.object.price }}</dd>
	{% if result.object.charges_details %}
	  <dt>{% trans "Nebenkosten" %}</dt><dd>{{ result.object.charges_details }}</dd>
	{% endif %}
	{% if result.object.time %}
	  <dt>{% trans "Verfügbarkeit" %}</dt><dd>{{ result.object.time }}</dd>
	{% endif %}
	{% if result.object.address %}
	  <dt>{% trans "Adresse" %}</dt><dd>{{ result.object.address }}</dd>
	{% endif %}
	{% if result.object.references %}
	  <dt>{% trans "Referenzen" %}</dt><dd>{{ result.object.references }}</dd>
	{% endif %}
	{% if result.object.taglist %}
  	  <dt>{% trans "Schlagwörter" %}</dt><dd>{{ result.object.taglist }}</dd>
	{% endif %}

      </dl>
    </div>


  {% endfor %}
</section>

<p class="nav navleft">
  <span>{% trans "Treffer/Seite:" %}
    <strong id="anzahl">{{ page.paginator.per_page }}</strong>
  </span>    
  <a id="adown" class="bdown {{ clsdown }}" 
     href="?q={{ query }}&amp;results_per_page={{ paginate_down }}"
     title="{% trans "weniger Treffer pro Seite zeigen" %}">
    <img src="{% static "img/fit/pfeil-weiss.png" %}" a
	 alt="{% trans "weniger Treffer pro Seite zeigen" %}" />
  </a>
  <a id="aup" class="bup {{ clsup }}" 
     href="?q={{ query }}&amp;results_per_page={{ paginate_up }}"
     title="{% trans "mehr Treffer pro Seite zeigen" %}">
    <img src="{% static "img/fit/pfeil-weiss.png" %}" 
	 alt="{% trans "mehr Treffer pro Seite zeigen" %}" />
  </a>
</p>

<p class="nav navright">
  <span>{% trans "Seite:" %}<strong id="pg">{{ page.number }}/{{ page.paginator.num_pages }}</strong></span>
  
  <a id="pm" 
     class="bleft {% if not page.has_previous %}off{% endif %} "
     {% if page.has_previous %}
     href="?q={{ query }}&amp;page={{ page.previous_page_number }}"
     {% endif %} 
     >
    
    <img src="{% static "img/fit/pfeil-weiss.png" %}" alt="{% trans "&laquo; Zurück" %}"/>
  </a>
  
  <a id="pp" 
     class="bright {% if not page.has_next %}off{% endif %}" 
     {% if page.has_next %}
     href="?q={{ query }}&amp;page={{ page.next_page_number }}"
     {% endif %}
     >
    <img src="{% static "img/fit/pfeil-weiss.png" %}" alt="{% trans "Vor &raquo;" %}"/>
  </a>
</p>

  
<script type="text/javascript">
  do_by_class("mehr", function (e){e.className = "";});
  do_by_class("labelmore", function (e){e.innerHTML = "{% trans "mehr..." %}";});
</script>



{% endblock content %}