Projekttypen verwaltbar gemacht
[kivitendo-erp.git] / templates / webpages / project_type / list.html
diff --git a/templates/webpages/project_type/list.html b/templates/webpages/project_type/list.html
new file mode 100644 (file)
index 0000000..fc45c0d
--- /dev/null
@@ -0,0 +1,42 @@
+[% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
+
+ <div class="listtop">[% FORM.title %]</div>
+
+[%- INCLUDE 'common/flash.html' %]
+
+ <form method="post" action="controller.pl">
+  [% IF !PROJECT_TYPES.size %]
+   <p>
+    [%- 'No project type has been created yet.' | $T8 %]
+   </p>
+
+  [%- ELSE %]
+   <table id="project_type_list">
+    <thead>
+    <tr class="listheading">
+     <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+     <th>[%- 'Description' | $T8 %]</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    [%- FOREACH project_type = PROJECT_TYPES %]
+    <tr class="listrow[% loop.count % 2 %]" id="project_type_id_[% project_type.id %]">
+     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
+     <td>
+      <a href="[% SELF.url_for(action => 'edit', id => project_type.id) %]">
+       [%- HTML.escape(project_type.description) %]
+      </a>
+     </td>
+    </tr>
+    [%- END %]
+    </tbody>
+   </table>
+  [%- END %]
+
+  <p>
+   <a href="[% SELF.url_for(action => 'new') %]">[%- 'Create new project type' | $T8 %]</a>
+  </p>
+ </form>
+
+ [% L.sortable_element('#project_type_list tbody', url => 'controller.pl?action=ProjectType/reorder', with => 'project_type_id') %]