base.html 4.52 KB
Newer Older
Dudás Ádám committed
1 2 3 4 5 6
<!DOCTYPE html>
{% load i18n %}
{% get_current_language as lang %}
<html lang="{{lang}}">
<head>
    <title>{% block title %}IK Cloud{% endblock %}</title>
7
    <link href='http://fonts.googleapis.com/css?family=Metrophobic' rel='stylesheet' type='text/css'>
Dudás Ádám committed
8
    <link rel="icon" type="image/png" href="/static/favicon.png" />
9
    <link rel="icon" type="image/png" href="one/static/favicon.png">
Dányi Bence committed
10
    <link rel="stylesheet/less" href="/static/style.less" />
11 12
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script src="/static/jquery.min.js"></script>
Dányi Bence committed
13
    <script src="/static/less.min.js"></script>
14
    <script type="text/javascript">
Dányi Bence committed
15
    var toggleDetails;
Őry Máté committed
16
$(function(){
Danyi Bence committed
17 18 19
    $('.wm .summary').each(function(){
      this.originalHeight=parseInt($(this).next('.details').css('height'));
    })
Dányi Bence committed
20
    toggleDetails=function(){
21
      if($(this).next('.details').is(':hidden')){
Bence Dnyi committed
22
            $(this).next('.details')
Danyi Bence committed
23
                .show()
Őry Máté committed
24 25
                .css('height',0)
                .css('padding','0px 5px')
Danyi Bence committed
26
                .animate({height:this.originalHeight,paddingTop:15,paddingBottom:15},700);
27
            $(this).parent('.wm').addClass('opened');
Őry Máté committed
28 29
        } else {
            var that=this;
Bence Dnyi committed
30
            $(this).next('.details')
Danyi Bence committed
31 32
              //2*15px paddingot le kell vonni, a jQuery szar
                .css('height',this.originalHeight-30)
Őry Máté committed
33 34
                .css('padding','15px 5px')
                .animate({height:0,paddingTop:0,paddingBottom:0},700,function(){
35
                $(that).parent('.wm').removeClass('opened');
Danyi Bence committed
36
                $(that).next('.details').hide();
Őry Máté committed
37 38
            });
        }
39 40
    }
    $('.wm .summary').click(toggleDetails);
41 42 43 44 45 46 47 48 49
    $('#load-more-files').click(function(){
        $('.actions', this).show();
        var that=this;
        setTimeout(function(){
            $(that).prev('li').slideDown(500,function(){
                $('.actions', that).hide();
            });
        },2000);
    })
50
    $('#new-wm-button').click(function(){
Dányi Bence committed
51 52 53 54 55 56 57
        $('#modal').show();
        $('#modal-container').html($('#new-wm').html());
        $('#modal-container .wm .summary').each(function(){
            this.originalHeight=parseInt($(this).next('.details').css('height'));
        })
        $('#modal-container .wm .summary').click(toggleDetails);
        });
58
    $('#new-template-button').click(function(){
Dányi Bence committed
59 60
        $('#modal').show();
        $('#modal-container').html($('#new-template').html());
61
    });
62
    $('#shadow').click(function(){
Dányi Bence committed
63
        $('#modal').hide();
64
    })
Dányi Bence committed
65 66 67 68 69 70
    $('#new-template-button').click(function(){
        $.get('/ajax/templateWizard', function(data){
            $('#modal-container').html(data);
        })
        $('#modal').show();
    });
Őry Máté committed
71 72
})
        </script>
Dudás Ádám committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103

    {{ form.media }}
    {% block js %}{% endblock %}
</head>

<body>
    <div id="header">
        {% block login %}
            <div id="loginblock"><p>
               {% if user.is_authenticated %}
                   Bejelentkezve: {{ user.username }}.
                   <a href="/logout/">Kijelentkezés</a>.
                   {% if user.is_staff %}
                   <a href="/admin/">Admin</a>.
                   {% endif %}
               {% else %}
                   <a href="/login/">Bejelentkezés</a>.
               {% endif %}
               <!--{% if lang == 'hu' %}
               <a href="/language/en-US/">In English</a>.
               {% else %}
               <a href="/language/hu/">Magyarul</a>.
                   {% if autolang %}
                   <p style="position: absolute; top: 40px; right: 1em;" class="triangle-border top">Böngészője kifejezetten angol tartalmat kért.<br/>A <a href="/language/hu/">magyar változat</a> részletesebb és frissebb!</p>
                   {% endif %}
               {% endif %}-->
               </p>
           </div>
        {% endblock %}
        {% block header %}
            {% block header_title %}
Dányi Bence committed
104
            <h1><a href="/">IK Cloud <span style="font-size: 21px">&beta;</span></a></h1>
Dudás Ádám committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118
            {% endblock %}
        {% endblock %}
    </div>

    {% block messages %}
        {% if messages %}
        <ul class="messagelist">{% for message in messages %}
          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
        {% endfor %}</ul>
        {% endif %}
    {% endblock messages %}

    <div id="content">
        {% block content %}{% endblock %}
Dányi Bence committed
119
        <div class="clear"></div>
Dudás Ádám committed
120
    </div>
Bence Dnyi committed
121 122 123
    <div id="modal" style="display: none">
        <div id="shadow"></div>
        <div id="modal-container">
Dányi Bence committed
124

Bence Dnyi committed
125 126
        </div>
    </div>
Dudás Ádám committed
127 128
</body>
</html>