fix bug 823; fix bug 800
[osm/LW-UI.git] / template / base.html
index 82497cd..1c68bb1 100644 (file)
@@ -1,3 +1,18 @@
+<!--
+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>