+<!--
+Copyright 2019 EveryUP srl
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
{% load staticfiles %}
{% load get %}
<!DOCTYPE html>
<!-- inner menu: contains the actual data -->
<ul class="menu">
{% for p in request.session.projects %}
- {% if p.name == user.project_name %}
+ {% if p.project_name == user.project_name %}
<li>
<a href="#">
<h3>
- <i class="fa fa-folder-open"></i> <span>{{ p.name }}</span>
+ <i class="fa fa-folder-open"></i> <span>{{ p.project_name }}</span>
</h3>
</a>
</li>
{% else %}
<li>
- <a href="{% url 'projects:switch_project' project_id=p|get:"_id" %}">
+ <a href="{% url 'projects:switch_project' project_id=p.project %}">
<h3>
- <i class="fa fa-folder"></i> <span>{{ p.name }}</span>
+ <i class="fa fa-folder"></i> <span>{{ p.project_name }}</span>
</h3>
</a>
</li>