g214/portal/templates/header.html

87 lines
4.1 KiB
HTML

{% load static %}
<div style="background-image: url({% static 'portal/image/6b.jpg' %});">
<nav class="nav-header nav-head navbar navbar-default">
<div class="container">
<div class="navbar-header">
<img class="g214logo" alt="Brand" src="{% static 'portal/image/g214-logo.png' %}">
</div>
{% if user.is_authenticated %}
<a href="{% url 'logout' %}" class="navbar-link nav-register">退出</a>
{% if request.user.is_staff %}
<a href="{% url 'order_audits' %}" class="navbar-link nav-register">审核</a>
{% endif %}
<a href="{% url 'my_order' %}" class="navbar-link nav-register">个人空间</a>
<a href="{% url 'my_cart' %}" class="navbar-link nav-register">
<i class="fa fa-shopping-cart"></i> 数据篮
<span id="cart-count" class="label label-danger">
{% if user.is_authenticated %}
{{ request.session.count }}
{% else %}
'0'
{% endif %}
</span>
</a>
<span class="nav-register" style="color: #ffffff;">欢迎,<strong>{{ user.username }}</strong></span>
{% else %}
<a href="{% url 'register' %}" class="nav-login navbar-link"><i class="iconfont icon-zhuce"
style="font-size: 17px;"><p
class="nav-link-content">注册</p></i></a>
<a href="{% url 'login' %}" class="nav-register navbar-link"><i class="iconfont icon-user"><p
class="nav-link-content">登录</p></i></a>
{% endif %}
</div>
</nav>
<nav class="nav-header navbar navbar-default nav-nav" style="height: 53px">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav" style="width: 100%">
<li style="margin-left: 2%;"><a href="{% url 'portal_index' %}"><span
class="glyphicon glyphicon-home" style="margin-right: 10px"></span>首页<span
class="sr-only">(current)</span></a></li>
<li>
<a href="{% url 'unit' %}?category=1">基地概况</a>
</li>
<li>
<a href="{% url 'news' %}">工作动态</a>
</li>
<li class="dropdown">
<a href="{% url 'results' %}?category=1">研究成果</a>
</li>
<li class="dropdown">
<a href="{% url 'metadata_index' %}">数据共享</a>
</li>
<li class="dropdown">
<a href="{% url 'base' %}">观测系统</a>
</li>
<li><a href="{% url 'map' %}">在线地图<span class="sr-only">(current)</span></a></li>
<li class="dropdown">
<a href="{% url 'unit' %}?category=21">科普基地</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</div>