murano-dashboard/muranodashboard/templates/catalog/index.html

119 lines
3.9 KiB
HTML

{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load url from future %}
{% block title %}{% trans "Applications" %}{% endblock %}
{% block page_header %}
<link rel="stylesheet" href="{% static 'muranodashboard/css/catalog.css' %}">
<link rel="stylesheet" href="{% static 'muranodashboard/css/font-awesome.min.css' %}">
{% include "horizon/common/_page_header.html" with title=_("Applications") %}
{% endblock page_header %}
{% block js %}
{% include "horizon/_scripts.html" %}
<script type="text/javascript">
var allPanelIds = ['#MuranoCategoriesPanel', '#MuranoSearchPanel',
'#MuranoDefaultEnvPanel'];
function bindPanelToggle(panelId) {
var toggler = $(panelId + 'Toggle'), panel = $(panelId);
toggler.click(function(event) {
panel.css('top', toggler.offset().top);
panel.toggleClass('panel-visible');
allPanelIds.forEach(function(panId) {
if ( panId != panelId ) {
$(panId).removeClass('panel-visible');
$(panId + 'Toggle').removeClass('active');
}
});
toggler.toggleClass('active');
})
}
$(function() {
bindPanelToggle('#MuranoCategoriesPanel');
bindPanelToggle('#MuranoSearchPanel');
bindPanelToggle('#MuranoDefaultEnvPanel');
})
</script>
{% endblock %}
{% block main %}
<div class="table_wrapper">
<h3 class="quota-heading">Latest Apps</h3>
<div class="app-row app-list row">
{% for app in latest_list %}
{% include 'catalog/app_tile.html' %}
{% endfor %}
</div>
<h3 class="quota-heading">App Category: <div class="header dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{ current_category }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{% for category in categories %}
<li><a tabindex="-1" href="
{% url 'horizon:murano:catalog:index' category page_obj.number %}">
{{ category }}</a></li>
{% endfor %}
</ul>
</div>
</h3>
<div class="app-row app-list row">
{% for app in object_list %}
{% include 'catalog/app_tile.html' %}
{% endfor %}
</div>
{% if is_paginated %}
<div class="btn-toolbar centering">
<div class="btn-group">
{% if page_obj.has_previous %}
{% with page_number=page_obj.previous_page_number link_text="Previous" %}
{% include 'catalog/page_link.html' %}
{% endwith %}
{% else %}
<a class="btn btn-default disabled" href="#">Previous</a>
{% endif %}
<a class="btn btn-default disabled"
href="
{% url 'horizon:murano:catalog:index' current_category page_obj.number %}">
{{ page_obj.number }}</a>
{% if page_obj.has_next %}
{% with page_number=page_obj.next_page_number link_text="Next" %}
{% include 'catalog/page_link.html' %}
{% endwith %}
{% else %}
<a class="btn btn-default disabled" href="#">Next</a>
{% endif %}
</div>
</div>
{% endif %}
<div class="murano-side-panel" id="MuranoDefaultEnvPanel">
{% include 'catalog/env_switcher.html' %}
</div>
<a class="trigger third" href="#" id="MuranoDefaultEnvPanelToggle"><i class="fa fa-desktop"></i></a>
<div class="murano-side-panel" id="MuranoCategoriesPanel">
{% include 'catalog/categories.html' %}
</div>
<a class="trigger second" href="#" id="MuranoCategoriesPanelToggle"><i class="fa fa-th-list"></i></a>
<div class="murano-side-panel" id="MuranoSearchPanel">
<h3>Search</h3>
<form class="search" method="GET" action="{% url 'horizon:murano:catalog:index' %}">
<input name="search" class="text input-medium search-query"/>
<button class="btn_search btn">Go</button>
</form>
</div>
<a class="trigger first" href="#" id="MuranoSearchPanelToggle"><i class="fa fa-search"></i></a>
</div>
{% endblock %}