Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / project / form.html
index c93a768..ee132ef 100644 (file)
@@ -7,7 +7,7 @@
 
 [%- INCLUDE 'common/flash.html' %]
 
- <form method="post" action="controller.pl">
+ <form method="post" action="controller.pl" id="form">
   [% L.hidden_tag("callback", callback) %]
   [% L.hidden_tag("id", SELF.project.id) %]
 
     [%- IF CUSTOM_VARIABLES.size %]
     <li><a href="#custom_variables">[% 'Custom Variables' | $T8 %]</a></li>
     [%- END %]
+    [%- IF SELF.may_edit_invoice_permissions %]
+     <li><a href="#invoice_permissions">[% 'Permissions for invoices' | $T8 %]</a></li>
+    [%- END %]
     [%- IF SELF.project.id %]
+      [%- IF INSTANCE_CONF.get_doc_storage %]
+        <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=project&object_id=[% SELF.project.id %]">[% 'Attachments' | $T8 %]</a></li>
+      [%- END %]
+    [%- END %]
+    [%- IF SELF.project.id and AUTH.assert('record_links', 1) %]
     <li><a href="#linked_records">[% 'Linked Records' | $T8 %]</a></li>
     [%- END %]
    </ul>
    </div>
    [%- END %]
 
-   [%- IF SELF.project.id %]
+   [%- IF SELF.may_edit_invoice_permissions %]
+    <div id="invoice_permissions">
+     [%- PROCESS 'project/_invoice_permissions.html' %]
+    </div>
+   [%- END %]
+
+   [%- IF SELF.project.id and AUTH.assert('record_links', 1) %]
    <div id="linked_records">
    [%- PROCESS 'project/_linked_records.html' records=SELF.linked_records %]
    </div>
    [%- END %]
 
   </div>
-
-  <p>
-   [% L.hidden_tag("action", "Project/dispatch") %]
-   [% L.submit_tag("action_" _  (SELF.project.id ? "update" : "create"), LxERP.t8('Save')) %]
-   [%- IF SELF.project.id %]
-    [% L.submit_tag("action_create", LxERP.t8('Save as new')) %]
-    [% L.submit_tag("action_destroy", LxERP.t8('Delete'), confirm=LxERP.t8('Do you really want to delete this object?')) IF !SELF.project.is_used %]
-   [%- END %]
-   <a href="[% IF callback %][% callback %][% ELSE %][% SELF.url_for(action => 'search') %][% END %]">[%- LxERP.t8('Abort') %]</a>
-  </p>
  </form>