ui fix
[osm/LW-UI.git] / projecthandler / template / project / projectlist.html
index 85abb59..ed8b583 100644 (file)
@@ -47,9 +47,7 @@
 
                                                <th>Modification Date</th>
                                                <th>Creation Date</th>
-
-
-                                               <th><i class="far fa-trash-alt"></i></th>
+                                               <th>Actions</th>
                                        </tr>
                                </thead>
                                <tbody>
                                                <td>{{ p|get_sub:"_admin,modified"|get_date}}</td>
                         <td>{{ p|get_sub:"_admin,created"|get_date}}</td>
 
-                                               <td><a href="javascript:deleteProject('{% url 'projects:delete_project' %}')"> Delete</a></td>
-
+                        <td>
+                            <div class="btn-group">
+                            <button type="button" class="btn btn-default dropdown-toggle"
+                                    data-toggle="dropdown" aria-expanded="false">Actions
+                                <span class="fa fa-caret-down"></span></button>
+                            <ul class="dropdown-menu">
+                                <li><a href="#"
+                                       onclick="javascript:editProject('{% url 'projects:edit_project'  project_id=p.name %}')">
+                                    <i class="fa fa-edit"></i> Rename</a></li>
+                                <li>
+                                    <a href="#" onclick="javascript:deleteProject('{% url 'projects:delete_project'  project_id=p.name%}')" style="color:red">
+                                        <i class="fa fa-trash"  ></i> Delete</a>
+                                </li>
+                            </ul>
+                            </div>
+                        </td>
                                        </tr>
                                {% endfor %}
                                </tbody>
@@ -74,7 +86,8 @@
 </div>
 
 </div>
-{% include "modal/new_project.html" %}
+{% include "modal/project_new.html" %}
+{% include "modal/project_edit.html" %}
 {% endblock %}
 
 {% block resource_block %}
         $('#modal_new_project').modal('show');
     }
 
+    function editProject(url){
+        $("#formEditProject").attr("action", url);
+        $('#modal_edit_project').modal('show');
+    }
+
     function deleteProject(url) {
     bootbox.confirm("Are you sure want to delete?", function (result) {
         if (result) {