]> git.agnieray.net Git - galette.git/commitdiff
Use same icon everywhere for contribution add
authorJohan Cwiklinski <johan@x-tnd.be>
Fri, 27 Oct 2023 12:47:07 +0000 (14:47 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Fri, 27 Oct 2023 12:47:07 +0000 (14:47 +0200)
More visible icons on liked transaction from contribution form (use same display as in transaction)

galette/templates/default/pages/contribution_form.html.twig
galette/templates/default/pages/contributions_list.html.twig
galette/templates/default/pages/member_show.html.twig

index 1aa824503e8bc796dfe15ef6f5821c729545274b..d5589aae70086f82b951b6cd1ecb4b7b17c4a8b5 100644 (file)
                                         <th class="listing">{{ _T("Member") }}</th>
                                         <th class="listing">{{ _T("Amount") }}</th>
                                         <th class="listing">{{ _T("Not dispatched amount") }}</th>
-                                        <th class="listing">{{ _T("Actions") }}</th>
                                     </tr>
                                 </thead>
+    {% if contribution.id and contribution.isTransactionPart() %}
+                                <tfoot>
+                                    <tr>
+                                        <td colspan="6">
+                                            <div class="ui basic fitted right aligned segment">
+                                                <a
+                                                    href="{{ url_for("editTransaction", {"id": contribution.transaction.id}) }}"
+                                                    class="ui icon blue compact button tooltip"
+                                                >
+                                                    <i class="eye icon tooltip"></i>
+                                                    <span class="ui special popup">{{ _T("View transaction") }}</span>
+                                                </a>
+        {% if contribution.transaction.getMissingAmount() > 0 %}
+                                                <a
+                                                    href="{{ url_for("addContribution", {"type": constant('Galette\\Entity\\Contribution::TYPE_FEE')}) }}?trans_id={{ contribution.transaction.id }}"
+                                                    class="ui icon green compact button tooltip"
+                                                    title="{{ _T("Create a new fee that will be attached to the current transaction") }}"
+                                                >
+                                                    <i class="plus tiny icon"></i>
+                                                    <i class="user check icon"></i>
+                                                    <span class="displaynone">{{ _T("Create a new fee that will be attached to the current transaction") }}</span>
+                                                </a>
+                                                <a
+                                                    href="{{ url_for("addContribution", {"type": constant('Galette\\Entity\\Contribution::TYPE_DONATION')}) }}?trans_id={{ contribution.transaction.id }}"
+                                                    class="ui icon green compact button tooltip"
+                                                    title="{{ _T("Create a new donation that will be attached to the current transaction") }}"
+                                                >
+                                                    <i class="plus tiny icon"></i>
+                                                    <i class="gift icon"></i>
+                                                    <span class="displaynone">{{ _T("Create a new donation that will be attached to the current transaction") }}</span>
+                                                </a>
+        {% endif %}
+                                            </div>
+
+                                        </td>
+                                    </tr>
+                                </tfoot>
+    {% endif %}
                                 <tbody>
                                     <tr>
                                         <td>{{ contribution.transaction.id }}</td>
                                         <td>{{ memberName({'id': mid}) }}</td>
                                         <td class="right">{{ contribution.transaction.amount }}</td>
                                         <td class="right">{{ contribution.transaction.getMissingAmount() }}</td>
-                                        <td>
-                                            <a
-                                                href="{{ url_for("editTransaction", {"id": contribution.transaction.id}) }}"
-                                            >
-                                                <i class="eye outline blue icon tooltip"></i>
-                                                <span class="ui special popup">{{ _T("View transaction") }}</span>
-                                            </a>
-    {% if contribution.isTransactionPart() and contribution.transaction.getMissingAmount() > 0 %}
-                                            <a
-                                                href="{{ url_for("addContribution", {"type": constant('Galette\\Entity\\Contribution::TYPE_FEE')}) }}?trans_id={{ contribution.transaction.id }}"
-                                            >
-                                                <i class="receipt green icon tooltip"></i>
-                                                <span class="ui special popup">{{ _T("New attached fee") }}</span>
-                                            </a>
-                                            <a
-                                                href="{{ url_for("addContribution", {"type": "donation"}) }}?trans_id={{ contribution.transaction.id }}"
-                                            >
-                                                <i class="gift green icon tooltip"></i>
-                                                <span class="ui special popup">{{ _T("New attached donation") }}</span>
-                                            </a>
-    {% endif %}
-                                        </td>
                                     </tr>
                                 </tbody>
                             </table>
index a4764d521e56e69753d80b11e730b894e4f2e9f7..2a5ae3d7763ec556103b6fb337753dcf1a74e3af 100644 (file)
             </div>
             <div class="item">
                 <a href="{{ url_for("addContribution", {"type": constant('Galette\\Entity\\Contribution::TYPE_FEE')}) }}?id_adh={{ member.id }}" class="ui tiny labeled icon button">
-                    <i class="ui receipt green icon" aria-hidden="true"></i>
+                    <i class="ui user check green icon" aria-hidden="true"></i>
                     {{ _T("Add a membership fee") }}
                 </a>
             </div>
             class="ui tiny labeled icon button"
             href="{{ url_for("addContribution", {type: constant('Galette\\Entity\\Contribution::TYPE_FEE')}) }}"
         >
-            <i class="ui receipt green icon" aria-hidden="true"></i>
+            <i class="ui user check green icon" aria-hidden="true"></i>
             {{ _T("Add a membership fee") }}
         </a>
         <a
index 99959c26ea1aa113835af94576bfb762cf9d0d27..a8616c07d2a97548ab0f7db1eb7d71a6c71f4223 100644 (file)
@@ -68,7 +68,7 @@
                                         href="{{ url_for("addContribution", {"type": constant('Galette\\Entity\\Contribution::TYPE_FEE')}) }}?id_adh={{ member.id }}"
                                         class="ui item"
                                     >
-                                        <i class="money bill alternate outline icon"></i>
+                                        <i class="user check icon"></i>
                                         {{ _T("Add a membership fee") }}
                                     </a>
                                     <a