home.html 5.37 KB
{% extends 'base.html'%}
{% load staticfiles %}
{% block content %}
    <div class="frame">
        <!-- //header -->
        <div class="container">
            <!-- //nav -->
            <div class="content">
                <div class = "shiftleft">
                    <h2>즐겨찾기</h2>
                </div>
                <table id="hor-minimalist-b" width = 1000px>
                    <thead>
                    <tr>
                        <td width=300><p>제목</p></td>
                        <td width=350><p>등록 시간</p></td>
                        <td width=350><p>최근 열람 시간</p></td>
                        <td width=100><p>즐겨찾기</p></td>
                        <td width=100><p>파일 크기</p></td>
                        <td width=100><p>파일 삭제</p></td>
                    </tr>
                    </thead>
                    {% if favorList %}
                        <tbody>
                        {% for fileRow in favorList %}
                            <tr>
                                <td width=50><a href="/download/{{ fileRow.bucketPath }}{{ fileRow.title }}//{{ fileRow.title }}//{{ fileRow.bucketPath }}" valign=center>{{ fileRow.title }}</a></td>
                                <td width=100><p href="", >{{ fileRow.uploaded_TM }}</p></td>
                                <td width=100><p  href="",>{{ fileRow.last_view_TM }}</p></td>
                                {% if fileRow.isFavor%}
                                    <td width=100><a  href="/changeFavor/{{ fileRow.bucketPath }}/{{ fileRow.title }}" align=center><img class = 'star_icon' src= "{% static 'resources/color_star.png' %}" width="50" height="50"/></a></td>
                                {% else %}
                                    <td width=100><a  href="/changeFavor/{{ fileRow.bucketPath }}/{{ fileRow.title }}" align=center><img class = 'star_icon' src= "{% static 'resources/gray_star.png' %}" width="50" height="50"/></a></td>
                                {% endif %}
                                <td width=100><p  href="", >{{ fileRow.fileSize }}</p></td>
                                <td width=100><a  href="/delete/{{ fileRow.bucketPath }}{{ fileRow.title }}//{{ fileRow.title }}//{{ fileRow.bucketPath }}" align=center><img class = 'trash_icon' src= "{% static 'resources/trashcan.png' %}" width="50" height="50"/></a></td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    {% endif %}
                </table>
                <div class = "shiftleft">
                    <h2>최근 항목</h2>
                </div>
                <table id="hor-minimalist-b" width = 1000px>
                    <thead>
                    <tr>
                        <td width=300><p >제목</p></td>
                        <td width=350><p >등록 시간</p></td>
                        <td width=350><p >최근 열람 시간</p></td>
                        <td width=100><p >즐겨찾기</p></td>
                        <td width=100><p >파일 크기</p></td>
                        <td width=100><p >파일 삭제</p></td>
                    </tr>
                    </thead>
                    {% if recentList %}
                        <tbody>
                        {% for fileRow in recentList %}
                            <tr>
                                <td width=50><a href="/download/{{ fileRow.bucketPath }}{{ fileRow.title }}//{{ fileRow.title }}//{{ fileRow.bucketPath }}" align=center>{{ fileRow.title }}</a></td>
                                <td width=100><p href="", >{{ fileRow.uploaded_TM }}</p></td>
                                <td width=100><p  href="" >{{ fileRow.last_view_TM }}</p></td>
                                {% if fileRow.isFavor%}
                                    <td width=100><a  href="/changeFavor/{{ fileRow.bucketPath }}/{{ fileRow.title }}" align=center><img class = 'star_icon' src= "{% static 'resources/color_star.png' %}" width="50" height="50"/></a></td>
                                {% else %}
                                    <td width=100><a  href="/changeFavor/{{ fileRow.bucketPath }}/{{ fileRow.title }}" align=center><img class = 'star_icon' src= "{% static 'resources/gray_star.png' %}" width="50" height="50"/></a></td>
                                {% endif %}
                                <td width=100><p  href="">{{ fileRow.fileSize }}</p></td>
                                <td width=100><a  href="/delete/{{ fileRow.bucketPath }}{{ fileRow.title }}//{{ fileRow.title }}//{{ fileRow.bucketPath }}" align=center><img class = 'trash_icon' src= "{% static 'resources/trashcan.png' %}" width="50" height="50"/></a></td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    {% endif %}
                </table>
            </div>
        </div>
        <!-- //container -->
    </div>

    <script src="{% static 'js/dropzone.js' %}"></script>
    <script type="text/javascript">
        Dropzone.options.dropzone = {
            maxFilesize: 10, // Mb
            init: function() {
                this.on('success', function(){
                    if (this.getQueuedFiles().length == 0 && this.getUploadingFiles().length == 0) {
                        location.reload();
                    }
                });
            }
        };
    </script>
    <!-- //frame -->
{% endblock %}