noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 01/01: Cosmétique 1. Remplace le caractère x


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/01: Cosmétique 1. Remplace le caractère x pour enlever des opérations par une constante 2. Ajoute les numéros de pièces dans le tableau de bord pour client, fournisseur et dernières opérations 3. Enlève les boutons "Ajout tag" et ajout concernés si l'utilisateur n'a pas accès
Date: Thu, 04 Jun 2015 21:05:47 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit cfe31a1afed1da93c010ccfcd31608dcc7f3ab87
Author: Dany De Bontridder <address@hidden>
Date:   Thu Jun 4 23:01:46 2015 +0200

    Cosmétique
    1. Remplace le caractère x pour enlever des opérations par une constante
    2. Ajoute les numéros de pièces dans le tableau de bord pour client, 
fournisseur et dernières opérations
    3. Enlève les boutons "Ajout tag" et ajout concernés si  l'utilisateur n'a 
pas accès
---
 html/ajax_ledger.php                      |    4 ++--
 include/ac_common.php                     |   10 ++++++++++
 include/class_acc_ledger.php              |   14 ++++++++++++--
 include/class_follow_up.php               |   11 ++++++++---
 include/class_html_input.php              |    2 +-
 include/class_tag.php                     |    2 +-
 include/template/dashboard.php            |    4 ++++
 include/template/detail-action.php        |   14 ++++++++++----
 include/template/ledger_detail_bottom.php |    2 +-
 9 files changed, 49 insertions(+), 14 deletions(-)

diff --git a/html/ajax_ledger.php b/html/ajax_ledger.php
index e44d94f..e01c7bf 100644
--- a/html/ajax_ledger.php
+++ b/html/ajax_ledger.php
@@ -291,7 +291,7 @@ case 'file':
         echo '<div class="op_detail_frame">';
         $x='';
         if ($access=='W' && $g_user->check_action (RMRECEIPT) == 1)
-            $x=sprintf('<a class="smallbutton" 
style="margin-left:12;margin-right:12" 
href="ajax_ledger.php?gDossier=%d&div=%s&jr_id=%s&act=rmf" onclick="return 
confirm(\'Effacer le document ?\')">&#x2D5D;</a>',
+            $x=sprintf('<a class="smallbutton" 
style="margin-left:12;margin-right:12" 
href="ajax_ledger.php?gDossier=%d&div=%s&jr_id=%s&act=rmf" onclick="return 
confirm(\'Effacer le document ?\')">'.SMALLX.'</a>',
                        $gDossier,$div,$jr_id);
         
         $filename= $obj->det->jr_pj_name;
@@ -333,7 +333,7 @@ case 'loadfile':
         
         // check if the user can remove a document
         if ($g_user->check_action (RMRECEIPT) == 1) {
-            $x=sprintf('<a class="mtitle" class="notice" 
style="margin-left:12;margin-right:12px" 
href="ajax_ledger.php?gDossier=%d&div=%s&jr_id=%s&act=rmf" onclick="return 
confirm(\'Effacer le document ?\')">'."&#x2D5D;".'</a>',
+            $x=sprintf('<a class="mtitle" class="notice" 
style="margin-left:12;margin-right:12px" 
href="ajax_ledger.php?gDossier=%d&div=%s&jr_id=%s&act=rmf" onclick="return 
confirm(\'Effacer le document ?\')">'.SMALLX.'</a>',
                    $gDossier,$div,$jr_id);
             echo $x;
         }
diff --git a/include/ac_common.php b/include/ac_common.php
index 201d1fb..2e35287 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -1067,6 +1067,12 @@ function ajax_xml_error($p_code,$p_string)
 </data>
 EOF;
 }
+/**
+ * @brief Display a box with the contains
+ * @param type $p_array Data to display
+ * @param type $p_title Title of the box
+ * @param type $p_div id of the box
+ */
 function display_dashboard_operation($p_array,$p_title,$p_div)
 {
        ?>
@@ -1078,6 +1084,7 @@ function 
display_dashboard_operation($p_array,$p_title,$p_div)
        <table class="result">
                <tr>
                        <th><?php echo _('Date')?></th>
+                       <th><?php echo _('Pièce')?></th>
                        <th><?php echo _('Code Interne')?></th>
                        <th><?php echo _('Description')?></th>
                        <th>
@@ -1095,6 +1102,9 @@ function 
display_dashboard_operation($p_array,$p_title,$p_div)
                        <td>
                                <?php echo 
HtmlInput::detail_op($p_array[$i]['jr_id'], $p_array[$i]['jr_internal']) ?>
                        </td>
+                        <td>
+                            <?php echo h($p_array[$i]['jr_pj_number'])?>
+                        </td>
                        <td>
                                <?php echo h($p_array[$i]['jr_comment']) ?>
                        </td>
diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php
index d298376..d45571d 100644
--- a/include/class_acc_ledger.php
+++ b/include/class_acc_ledger.php
@@ -3783,7 +3783,17 @@ class Acc_Ledger extends jrn_def_sql
                        throw $e;
                }
        }
-
+        /**
+         * Get operation from the ledger type before, after or with the 
+         * given date . The array is filtered by the ledgers granted to the 
+         * user
+         * @global type $g_user
+         * @param $p_date Date (d.m.Y)
+         * @param $p_ledger_type VEN ACH 
+         * @param type $sql_op < > or =
+         * @return array from jrn (jr_id, jr_internal, jr_date, 
jr_comment,jr_pj_number,jr_montant)
+         * @throws Exception
+         */
        function get_operation_date($p_date,$p_ledger_type,$sql_op)
        {
                global $g_user;
@@ -3800,7 +3810,7 @@ class Acc_Ledger extends jrn_def_sql
                }
 
 
-               $sql = "select jr_id, jr_internal, jr_date, 
jr_comment,jr_comment,jr_montant
+               $sql = "select jr_id, jr_internal, jr_date, 
jr_comment,jr_pj_number,jr_montant
                                from jrn
                                join jrn_def on (jrn_def_id=jr_def_id)
                                where
diff --git a/include/class_follow_up.php b/include/class_follow_up.php
index 95040a4..3434864 100644
--- a/include/class_follow_up.php
+++ b/include/class_follow_up.php
@@ -1528,6 +1528,7 @@ class Follow_Up
          */
         function tag_cell()
         {
+            global $g_user;
             $a_tag=$this->tag_get();
             $c=count($a_tag);
             for ($e=0;$e<$c;$e++) {
@@ -1535,13 +1536,17 @@ class Follow_Up
                         $a_tag[$e]['t_id']);
                 echo '<span style="border:1px solid black;margin-right:5px;">';
                 echo $a_tag[$e]['t_tag'];
-                echo HtmlInput::anchor( " &#x2D5D; ", "javascript:void(0)", 
$js_remove, ' class="smallbutton" style="padding:0px;display:inline" ');
+                if  ($g_user->can_write_action($this->ag_id) == true ) 
+                    { HtmlInput::anchor( SMALLX, "javascript:void(0)", 
$js_remove, ' class="smallbutton" style="padding:0px;display:inline" ');}
                 echo '</span>';
                 echo '&nbsp;';
                 echo '&nbsp;';
             }
             
$js=sprintf("onclick=\"action_tag_select('%s','%s')\"",dossier::id(),$this->ag_id);
-            echo HtmlInput::button('tag_bt', 'Ajout tag',$js, 'smallbutton');
+            if  ($g_user->can_write_action($this->ag_id) == true )
+            {
+                echo HtmlInput::button('tag_bt', 'Ajout tag',$js, 
'smallbutton');
+            }
 
         }
         static function action_tag_remove($cn,$p_array)
@@ -1692,7 +1697,7 @@ class Follow_Up
                         $a_linked[$i]['f_id'],$this->ag_id);
                 echo '<span style="border:1px solid black;margin-right:5px;">';
                 echo $qc;
-                echo HtmlInput::anchor( " &#x2D5D; ", "javascript:void(0)", 
$js_remove, ' class="smallbutton" style="padding:0px;display:inline" ');
+                echo HtmlInput::anchor(SMALLX, "javascript:void(0)", 
$js_remove, ' class="smallbutton" style="padding:0px;display:inline" ');
                 echo '</span>';
                 echo '&nbsp;';
                 echo '&nbsp;';
diff --git a/include/class_html_input.php b/include/class_html_input.php
index c45f382..4873981 100755
--- a/include/class_html_input.php
+++ b/include/class_html_input.php
@@ -904,7 +904,7 @@ class HtmlInput
             $rmOperation=sprintf("javascript:if ( confirm('"._('Voulez-vous 
effacer cette relation ')."')==true ) {remove_operation('%s','%s');}",
                                                        dossier::id(),
                                                        $p_operation);
-            $js= '<a class="tinybutton" id="acop'.$p_operation.'" 
href="'.$rmOperation.'">'."&#x2D5D;".'</a>';
+            $js= '<a class="tinybutton" id="acop'.$p_operation.'" 
href="'.$rmOperation.'">'.SMALLX.'</a>';
             return $js;
         }
         static function button_action_add_concerned_card($p_agid)
diff --git a/include/class_tag.php b/include/class_tag.php
index 8d2323e..b36b251 100644
--- a/include/class_tag.php
+++ b/include/class_tag.php
@@ -100,7 +100,7 @@ class Tag
         echo h($this->data->t_tag);
         echo HtmlInput::hidden($p_prefix.'tag[]', $this->data->t_id);
         $js=sprintf("$('sp_".$p_prefix.$this->data->t_id."').remove();");
-        echo HtmlInput::anchor( " &#x2D5D; ", "javascript:void(0)", 
"onclick=\"$js\"", ' class="smallbutton " style="padding:0px;display:inline" ');
+        echo HtmlInput::anchor( SMALLX, "javascript:void(0)", 
"onclick=\"$js\"", ' class="smallbutton " style="padding:0px;display:inline" ');
         echo '</span>';
     }
     /**
diff --git a/include/template/dashboard.php b/include/template/dashboard.php
index 3bcbeb5..571ab7e 100644
--- a/include/template/dashboard.php
+++ b/include/template/dashboard.php
@@ -266,6 +266,10 @@ for($i=0;$i<count($last_ledger);$i++):
        <td>
                <?php echo $last_ledger[$i]['jrn_def_code']?>
        </td>
+        <td>
+               <?php echo $last_ledger[$i]['jr_pj_number']?>
+            
+        </td>
 <td>
    <?php echo h(mb_substr($last_ledger[$i]['jr_comment'],0,40,'UTF-8'))?>
 </td>
diff --git a/include/template/detail-action.php 
b/include/template/detail-action.php
index b5a6d3a..8a30138 100644
--- a/include/template/detail-action.php
+++ b/include/template/detail-action.php
@@ -49,7 +49,10 @@
          <?php echo _('Contact')?>
           </TD>
           <TD>
-  <?php echo $ag_contact->search().$ag_contact->input();
+  <?php 
+  if  ($g_user->can_write_action($this->ag_id) == true ):
+    echo $ag_contact->search().$ag_contact->input();
+  endif;
             ?>
           </td>
           </Tr>
@@ -66,7 +69,10 @@
               <td id="concerned_card_td">
               <?php 
                     echo $this->display_linked();
-                    echo HtmlInput::button_action_add_concerned_card( 
$this->ag_id)?>
+                     if  ($g_user->can_write_action($this->ag_id) == true ):
+                        echo HtmlInput::button_action_add_concerned_card( 
$this->ag_id);
+                     endif;
+               ?>
               </td>
               <td>
 
@@ -191,7 +197,7 @@
                                        dossier::id(),
                                        
$action[$o]['ag_id'],$_REQUEST['ag_id']);
                             $showAction='<a class="line" 
href="'.$base."&ag_id=".$action[$o]['ag_id'].'">';
-                            $js= '<a class="tinybutton" 
id="acact'.$action[$o]['ag_id'].'" href="'.$rmAction.'">&#x2D5D;</a>';
+                            $js= '<a class="tinybutton" 
id="acact'.$action[$o]['ag_id'].'" href="'.$rmAction.'">'.SMALLX.'</a>';
                             echo '<li 
id="act'.$action[$o]['ag_id'].'">'.$showAction.$action[$o]['str_date']." 
".$action[$o]['ag_ref']." ".
                                        
h($action[$o]['sub_title']).'('.h($action[$o]['dt_value']).')</a>'." "
                                .$js.'</li>';
@@ -268,7 +274,7 @@ for( $c=0;$c<count($acomment);$c++){
                $rmComment=sprintf("javascript:if ( confirm('"._('Voulez-vous 
effacer ce commentaire')." ?')==true ) {remove_comment('%s','%s');}",
                                                dossier::id(),
                                                $acomment[$c]['agc_id']);
-                               $js= '<a class="tinybutton" 
id="accom'.$acomment[$c]['agc_id'].'" href="'.$rmComment.'">&#x2D5D;</a>';
+                               $js= '<a class="tinybutton" 
id="accom'.$acomment[$c]['agc_id'].'" href="'.$rmComment.'">'.SMALLX.'</a>';
                echo 
hb('n°'.$acomment[$c]['agc_id'].'('.$acomment[$c]['tech_user']." 
".$acomment[$c]['str_agc_date'].')').$js.
                                '<pre style="white-space: 
-moz-pre-wrap;white-space: pre-wrap;border:1px solid blue;width:80%;" 
id="com'.$acomment[$c]['agc_id'].'"> '.
                                " ".h($acomment[$c]['agc_comment']).'</pre>'
diff --git a/include/template/ledger_detail_bottom.php 
b/include/template/ledger_detail_bottom.php
index 6d0ce65..66119db 100644
--- a/include/template/ledger_detail_bottom.php
+++ b/include/template/ledger_detail_bottom.php
@@ -166,7 +166,7 @@ if ($aRap  != null ) {
     $amount=$array_jr[0]['jr_montant'];
     $str="modifyOperation(".$aRap[$e].",".$gDossier.")";
     $rmReconciliation=new IButton('rmr');
-    $rmReconciliation->label='&#x2D5D;';
+    $rmReconciliation->label=SMALLX;
     $rmReconciliation->class="tinybutton";
     $rmReconciliation->javascript="if (confirm ('vous confirmez?') ) {";
     
$rmReconciliation->javascript.=sprintf('dropLink(\'%s\',\'%s\',\'%s\',\'%s\');deleteRowRec(\'%s\',this);}',



reply via email to

[Prev in Thread] Current Thread [Next in Thread]