Bug 12019: FIX budget_owner_id node is duplicated
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbudgets.tt
index b845d26..92a7d89 100644 (file)
@@ -160,7 +160,7 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget")
                 }
 
                 var nTrs = $('#budgeth tbody tr');
-                var iColspan = nTrs[1].getElementsByTagName('td').length;
+                var iColspan = nTrs[0].getElementsByTagName('td').length;
                 var sLastGroup = "";
                 for ( var i=0 ; i<nTrs.length ; i++ )
                 {
@@ -180,11 +180,11 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget")
                 }
             },
             "aoColumnDefs": [
-                { "bVisible": false, "aTargets": [ 0, 1 ] }
+                { "bVisible": false, "aTargets": [ 0, 1 ] },
+                { "bSortable": false, "aTargets": ["_all"] }
             ],
-            "aaSortingFixed": [[ 1, 'asc' ]],
-            "aaSorting": [[ 2, 'asc' ]],
-            'bSort': false,
+            'bSort': true,
+            'aaSortingFixed': [[ 1, 'asc' ]],
             'bPaginate': false,
             "bAutoWidth": false
         }));
@@ -313,7 +313,7 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget")
       <tr data-tt-id="[% budget.budget_id %]">
     [% END %]
     <td>[% budget.budget_period_active %]</td>
-    <td>Budget [% budget.budget_period_description %]</td>
+    <td>Budget [% budget.budget_period_description %] [id=[% budget.budget_period_id %]][% UNLESS budget.budget_period_active %] (inactive)[% END %]</td>
     <td>[% budget.budget_code_indent %]</td>
     <td>[% budget.budget_name %]</td>
     <td class="data">
@@ -384,9 +384,16 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget")
         <td> <span style="color: gray;"> Edit Delete </span> </td>
     [% ELSE %]
         <td>
-            <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]" >Edit</a>
-            <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=delete_confirm&amp;budget_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]">Delete</a>
-            <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_parent_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]">Add child fund</a>
+            <div class="dropdown dropup">
+                <a class="btn btn-mini dropdown-toggle" id="budgetactions[% budget.budget_id %]_[% budget.budget_period_id %]" role="button" data-toggle="dropdown" href="#">
+                   Actions <b class="caret"></b>
+                </a>
+                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="budgetactions[% budget.budget_id %]_[% budget.budget_period_id %]">
+                    <li><a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]" >Edit</a></li>
+                    <li><a href="/cgi-bin/koha/admin/aqbudgets.pl?op=delete_confirm&amp;budget_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]">Delete</a></li>
+                    <li><a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_parent_id=[% budget.budget_id %]&amp;budget_period_id=[% budget.budget_period_id %]">Add child fund</a></li>
+                </ul>
+            </div>
         </td>
     [% END %]
     </tr>
@@ -445,7 +452,7 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget")
 
     <li>
       <label for="budget_expend">Warning at (amount): </label>
-      <input type="text" name="budget_expend" id="budget_expend" value="[% budget_expend %]" size="10" /><input type="hidden" name="budget_owner_id" id="budget_owner_id" value="[% budget_owner_id %]" />
+      <input type="text" name="budget_expend" id="budget_expend" value="[% budget_expend %]" size="10" />
       <span style="color:grey">0 to disable</span>
     </li>