]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Add missing tpl files
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 31 Dec 2007 09:40:07 +0000 (09:40 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 31 Dec 2007 09:40:07 +0000 (09:40 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6166 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/lang/es/tpl/add_media.tpl [new file with mode: 0644]
gui/bweb/lang/es/tpl/btime.tpl [new file with mode: 0644]
gui/bweb/lang/es/tpl/display_user.tpl [new file with mode: 0644]
gui/bweb/lang/es/tpl/display_users.tpl [new file with mode: 0644]
gui/bweb/lang/es/tpl/overview.tpl [new file with mode: 0644]
gui/bweb/lang/fr/tpl/add_media.tpl [new file with mode: 0644]
gui/bweb/lang/fr/tpl/btime.tpl [new file with mode: 0644]
gui/bweb/lang/fr/tpl/display_user.tpl [new file with mode: 0644]
gui/bweb/lang/fr/tpl/display_users.tpl [new file with mode: 0644]
gui/bweb/lang/fr/tpl/overview.tpl [new file with mode: 0644]

diff --git a/gui/bweb/lang/es/tpl/add_media.tpl b/gui/bweb/lang/es/tpl/add_media.tpl
new file mode 100644 (file)
index 0000000..56ca266
--- /dev/null
@@ -0,0 +1,40 @@
+
+<div class='titlediv'>
+  <h1 class='newstitle'> Add Media</h1>
+</div>
+<div class='bodydiv'>
+   <form action="?" method='get'>
+    <table>
+     <tr><td>Pool:</td>
+         <td> 
+            <select name='pool' size='5' class='formulaire'>
+            <TMPL_LOOP db_pools>
+            <option><TMPL_VAR name></option>
+            </TMPL_LOOP>
+            </select>
+         </td>
+     </tr>
+     <tr><td>Almacenamiento :</td> 
+         <td>
+            <select name='storage' size='5' class='formulaire'>
+            <TMPL_LOOP storage>
+            <option><TMPL_VAR name></option>
+            </TMPL_LOOP>
+            </select>
+         </td>
+     </tr>
+     <tr><td>Number of media to create:</td> 
+         <td><input size='3' type='text' name='nb' value='1' class='formulaire'></td>
+     </tr>
+     <tr><td>Starting number:</td> 
+         <td><input size='3' type='text' name='offset' class='formulaire' value='1'></td>
+     </tr>
+     <tr><td>Nombre :</td> 
+         <td><input size='8' type='text' name='media' class='formulaire' value='Vol'></td>
+     </tr>
+    </table>
+    <button type="submit" class="bp" name='action' value='add_media'>
+     <img src='/bweb/add.png' alt=''>Add<button>
+   </form>
+</div>
+
diff --git a/gui/bweb/lang/es/tpl/btime.tpl b/gui/bweb/lang/es/tpl/btime.tpl
new file mode 100644 (file)
index 0000000..372612d
--- /dev/null
@@ -0,0 +1,176 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'>Timing Statistics</h1>
+ </div>
+ <div class='bodydiv'>
+<table border='0' valign='top'>
+<td>
+<form name='form1' action='?' method='GET'>
+       <div class="otherboxtitle" valign='top'>
+          Options &nbsp;
+        </div>
+        <div class="otherbox">
+<table border='0'>
+<tr>
+  <td>
+    <h2>Time limits</h2>
+     <table>
+      <tr><td> Begin: </td> <td><input class='formulaire' type='text' 
+           id='iso_begin' name='iso_begin' title='YYYY-MM-DD HH:MM' 
+           <TMPL_IF qiso_begin> value=<TMPL_VAR qiso_begin> </TMPL_IF> 
+           size='16'>
+      </td></tr>
+      <tr><td> End: </td><td> <input type='text' class='formulaire' 
+       id='iso_end' name='iso_end' title='YYYY-MM-DD HH:MM'
+       <TMPL_IF qiso_end> value=<TMPL_VAR qiso_end> </TMPL_IF>
+        size='16'>
+      </td></tr>
+     </table>
+  </td>
+</tr>
+<tr>
+  <td>
+    <h2>Graph</h2>
+      <input type='checkbox' 
+             <TMPL_IF qusage>checked</TMPL_IF> 
+             name="usage"> Drive usage<br/>
+      <input type='checkbox' 
+             <TMPL_IF qpool>checked</TMPL_IF> 
+             name="pool"> Pool usage<br/>
+      <input type='checkbox' 
+             <TMPL_IF qnojob>checked</TMPL_IF> 
+             name="nojob"> Hide Job<br/>
+<TMPL_IF db_client_groups>
+<tr>
+  <td valign='top'>
+    <h2>Groupes</h2>
+    <select name='client_group' size='10' class='formulaire' multiple>
+<TMPL_LOOP db_client_groups>
+       <option id= 'group_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+</TMPL_IF>
+  </td>
+</tr>
+<!--
+  <td valign='top'>
+    <h2>Nivel</h2>
+    <select name='level' class='formulaire'>
+      <option id='level_Any' value='Any'>Cualquiera</option>
+      <option id='level_F' value='F'>Completo</option>
+      <option id='level_D' value='D'>Diferencial</option>
+      <option id='level_I' value='I'>Incremental</option>
+    </select>     
+  </td><td valign='top'>
+    <h2>Estado</h2>
+    <select name='status' class='formulaire'>
+      <option id='status_Any' value='Any'>Cualquiera</option>
+      <option id='status_T'   value='T'>Ok</option>
+      <option id='status_f'   value='f'>Error</option>
+      <option id='status_A'   value='A'>Cancelado</option>
+    </select>   
+  </td>
+</tr>
+<tr>
+  <td valign='top'>
+    <h2>Tiempo</h2>
+    <select name='age' class='formulaire'>
+      <option id='age_604800'   value='604800'>Esta Semana</option>
+      <option id='age_2678400'  value='2678400'>Últimos 30 días</option>
+      <option id='age_15552000' value='15552000'>Últimos 6 meses</option>
+    </select>     
+  </td>
+  <td  valign='top'>
+    <h2>Tamaño</h2>
+     Ancho: &nbsp;<input class='formulaire' type='text' 
+                        name='width' value='<TMPL_VAR width>' size='4'><br/>
+     Alto:  <input type='text' class='formulaire' 
+               name='height' value='<TMPL_VAR height>' size='4'><br/>
+  </td>
+</tr>
+<tr>
+  <td valign='top'> 
+    <h2>Clientes</h2>
+    <select name='client' size='15' class='formulaire' multiple>
+<TMPL_LOOP NAME=db_clients>
+      <option id='client_<TMPL_VAR clientname>'><TMPL_VAR clientname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+  <td valign='top'> 
+    <h2>Nombre Job</h2>
+    <select name='jobname' size='15' class='formulaire' multiple>
+<TMPL_LOOP NAME=db_jobnames>
+      <option><TMPL_VAR NAME=jobname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+-->
+<tr>
+<td>
+  <input type='submit' name='action' value='graph' class='formulaire'> 
+</td>
+</tr>
+</table>
+        </div>
+
+</form>
+</td>
+<td>
+
+ <div class="otherboxtitle">
+ Current &nbsp;
+ </div>
+ <div class="otherbox">
+ <img src='<TMPL_VAR result>' alt='Nothing to display, Try a bigger date range'>
+ </div>
+
+</td>
+</table>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+  <TMPL_LOOP qclient_groups>
+     document.getElementById('group_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_LOOP qclients>
+     document.getElementById('client_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_IF status>
+     document.getElementById('status_<TMPL_VAR status>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF level>
+     document.getElementById('level_<TMPL_VAR level>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF age>
+     document.getElementById('age_<TMPL_VAR age>').selected=true;
+  </TMPL_IF>
+
+<TMPL_IF qfilesets>
+  for (var i=0; i < document.form1.fileset.length; ++i) {
+  <TMPL_LOOP qfilesets>
+     if (document.form1.fileset[i].value == <TMPL_VAR name>) {
+        document.form1.fileset[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+
+<TMPL_IF qjobnames>
+  for (var i=0; i < document.form1.jobname.length; ++i) {
+  <TMPL_LOOP qjobnames>
+     if (document.form1.jobname[i].value == <TMPL_VAR name>) {
+        document.form1.jobname[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+</script>
+
diff --git a/gui/bweb/lang/es/tpl/display_user.tpl b/gui/bweb/lang/es/tpl/display_user.tpl
new file mode 100644 (file)
index 0000000..38de426
--- /dev/null
@@ -0,0 +1,120 @@
+<div class='titlediv'>
+  <h1 class='newstitle'>Usuario: <TMPL_VAR username></h1>
+</div>
+<div class='bodydiv'>
+
+<form name="form1" action="?">
+<input type="hidden" value='1' name="create">
+ <table>
+ <tr>
+  <td>Username:</td> <td> <input class="formulaire" type="text" name="username" value='<TMPL_VAR username>'> </td>
+<!-- </tr><tr>
+  <td>Password:</td> <td> <input class="formulaire" type="password" name="passwd" value='<TMPL_VAR passwd>'> </td>
+-->
+ </tr><tr>
+  <td>Comentario:</td> <td> <input class="formulaire" type="text" name="comment" value='<TMPL_VAR comment>'> </td>
+ </tr><tr>
+  <td>Language:</td> 
+   <td> 
+ <select name="lang" id='lang' class="formulaire">
+  <option id='lang_en' value='en'>English</option>
+  <option id='lang_fr' value='fr'>French</option>
+  <option id='lang_es' value='es'>Spanish</option>
+ </select>
+   </td>
+ </tr><tr>
+<td> Profile:</td><td>
+ <select name="profile" id='profile' class="formulaire">
+  <option onclick='set_role("")'></option>
+  <option onclick='set_role("administrator")'>Administrator</option>
+  <option onclick='set_role("customer")'>Customer</option>
+ </select>
+</td><td>Or like an existing user: </td><td>
+ <select name="copy_username" class="formulaire">
+  <option onclick="disable_sel(false)"></option>
+ <TMPL_LOOP db_usernames>
+  <option title="<TMPL_VAR comment>" onclick="disable_sel(true)" value='<TMPL_VAR username>'><TMPL_VAR username></option>
+ </TMPL_LOOP>
+ </select>
+</td>
+ </tr><tr>
+ </tr><tr>
+<td> Roles:</td><td>
+ <select name="rolename" id='rolename' multiple class="formulaire" size=15>
+ <TMPL_LOOP db_roles>
+  <option title="<TMPL_VAR comment>" value='<TMPL_VAR rolename>' <TMPL_IF userid>selected</TMPL_IF> ><TMPL_VAR rolename></option>
+ </TMPL_LOOP>
+ </select>
+ </td>
+</tr><tr>
+<td> Use groups filter:</td><td>
+<input class="formulaire" onclick="disable_group(this.checked == false)" type="checkbox" name="use_acl" <TMPL_IF use_acl> checked </TMPL_IF> > </td>
+</tr><tr>
+<td> Groups:</td><td>
+ <select name="client_group" id='client_group' multiple class="formulaire" size=15>
+<TMPL_LOOP db_client_groups>
+        <option id='group_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+ </select>
+ </td>
+</tr>
+</table>
+    <button type="submit" class="bp" name='action' value='user_save'>
+     <img src='/bweb/save.png' alt=''> </button>
+</form>
+</div>
+
+<script type="text/javascript" language='JavaScript'>
+
+<TMPL_LOOP client_group>
+    document.getElementById('group_<TMPL_VAR name>').selected = true;
+</TMPL_LOOP>
+
+<TMPL_UNLESS use_acl>
+disable_group(true); 
+</TMPL_UNLESS>
+
+function disable_sel(val) 
+{
+       document.form1.profile.disabled = val;
+       document.form1.rolename.disabled = val;
+}
+function disable_group(val) 
+{
+       document.form1.client_group.disabled = val;
+}
+function set_role(val)
+{
+   if (val == "administrator") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+             document.form1.rolename[i].selected = true;
+       }
+   } else if (val == "production") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+          if (document.form1.rolename[i].value != 'r_configure' &&
+               document.form1.rolename[i].value != 'r_user_mgnt' &&
+               document.form1.rolename[i].value != 'r_group_mgnt'
+               )
+           {
+             document.form1.rolename[i].selected = true;
+           }
+        }
+   } else if (val == "customer") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+          if (document.form1.rolename[i].value == 'r_view_stats'   ||
+               document.form1.rolename[i].value == 'r_view_history' ||
+               document.form1.rolename[i].value == 'r_view_log'
+               )
+           {
+             document.form1.rolename[i].selected = true;
+          } else {
+             document.form1.rolename[i].selected = false;
+          }
+       }
+   }
+
+}
+<TMPL_IF lang>
+  document.getElementById('lang_<TMPL_VAR lang>').selected = true;
+</TMPL_IF>
+</script>
diff --git a/gui/bweb/lang/es/tpl/display_users.tpl b/gui/bweb/lang/es/tpl/display_users.tpl
new file mode 100644 (file)
index 0000000..9ecfe30
--- /dev/null
@@ -0,0 +1,63 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Users</h1>
+ </div>
+ <div class="bodydiv">
+   <form action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    <button type="submit" class="bp" name='action' value='user_add' title='Add'> <img src='/bweb/add.png' alt=''>Add</button>
+    <button type="submit" class="bp" name='action' value='user_del' 
+     onclick="return confirm('Do you want to delete this user ?');" 
+     title='Remove'> <img src='/bweb/remove.png' alt=''>Remove </button>
+    <button type="submit" class="bp" name='action' value='user_edit' title='Editar'> <img src='/bweb/edit.png' alt=''>Editar </button>
+
+    <button type="submit" class="bp" name='action' value='client' title='View clients'> <img src='/bweb/zoom.png' alt=''>View clients</button>
+    <button type="submit" class="bp" name='action' value='job' title='Ver jobs'> <img src='/bweb/zoom.png' alt=''>Ver jobs</button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Username","Selection");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP db_usernames>
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.name  = 'username';
+chkbox.value = '<TMPL_VAR username>';
+
+data.push( new Array(
+"<TMPL_VAR username>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+</script>
+
+
diff --git a/gui/bweb/lang/es/tpl/overview.tpl b/gui/bweb/lang/es/tpl/overview.tpl
new file mode 100644 (file)
index 0000000..9f44534
--- /dev/null
@@ -0,0 +1,117 @@
+<style type="text/css">
+table.sample {
+       border-width: 1px 1px 1px 1px;
+       border-spacing: 3px;
+       border-style: solid solid solid solid;
+       border-color: black black black black;
+       border-collapse: collapse;
+       background-color: white;
+}
+table.sample th {
+       border-width: 1px 1px 1px 1px;
+       padding: 4px 4px 4px 4px;
+       border-style: solid solid solid solid;
+       border-color: gray gray gray gray;
+       background-color: white;
+}
+table.sample td {
+       border-width: 1px 1px 1px 1px;
+       padding: 4px 4px 4px 4px;
+       border-style: solid solid solid solid;
+       border-color: gray gray gray gray;
+       background-color: white;
+}
+</style>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Jobs overview (<TMPL_VAR label>)</h1>
+ </div>
+ <div class='bodydiv'>
+  <table class='sample' id='report'>
+   <tr id='days'><td/>
+  </table>
+ </div>
+
+
+
+<script type="text/javascript" language="JavaScript">
+
+var table = document.getElementById('report');
+var nodate = new Array();
+var nb_col=1;
+var tr; var td; var img; var infos;
+var all = new Array();
+var max_cel=0;
+var min_cel=200;
+
+<TMPL_LOOP items>
+infos = new Array();
+ <TMPL_LOOP events>
+ min_cel=(min_cel< <TMPL_VAR num>)?min_cel:<TMPL_VAR num>;
+ infos[<TMPL_VAR num>] = new Array('<TMPL_VAR num>', '<TMPL_VAR status>', 
+                                   <TMPL_VAR joberrors>, '<TMPL_VAR title>');
+ </TMPL_LOOP>
+max_cel=(max_cel>infos.length)?max_cel:infos.length;
+all.push({ name: "<TMPL_VAR name>", values: infos});
+</TMPL_LOOP>
+
+//infos = new Array();
+//infos[1] = new Array('2007-10-01', 'T', 8);
+//infos[2] = new Array('2007-10-02', 'T', 8);
+//infos[5] = new Array('2007-10-05', 'R', 8);
+//
+//max_cel=(max_cel>infos.length)?max_cel:infos.length;
+//all.push({ name: "zog", values: infos});
+
+function init_tab() // initialize the table
+{
+    for(var j=min_cel; j < max_cel ; j++) {
+       var t=document.createElement("TD");
+       t.setAttribute("id", "day" + j);
+       nodate[j]=1;
+       document.getElementById("days").appendChild(t);
+    }
+}
+
+function add_client(name, infos)
+{
+    tr=document.createElement("TR"); // client row
+    table.appendChild(tr);
+
+    td=document.createElement("TD"); // client name
+    tr.appendChild(td);
+    a=document.createElement("A");
+    a.setAttribute("href", "?action=<TMPL_VAR action>" + name);
+    a.appendChild(document.createTextNode(name));
+    td.appendChild(a);
+    var len = infos.length;
+
+    for(var j=min_cel; j < max_cel ; j++) { // one img for each days
+        td=document.createElement("TD"); 
+        tr.appendChild(td);
+        if (len > j && infos[j]) {
+           if (nodate[j] == 1) { // put the date in the first row if empty
+              var t = document.getElementById("day" + j);
+              t.appendChild(document.createTextNode(infos[j][0]));
+              nodate[j]=0;
+           }
+//         a=document.createElement("A"); // create a link to action=job
+//         a.setAttribute('href', "?action=job;client_group=" + name);
+            img=document.createElement("IMG");
+            img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2]));
+            img.setAttribute("title", infos[j][3]);
+//         a.appendChild(img);
+            td.appendChild(img);
+        } else {
+//            td.appendChild(document.createTextNode('N/A'));
+        }
+    }
+}
+
+init_tab();
+
+for(var i=0; i<all.length; i++) {
+   var elt = all[i];
+   add_client(elt['name'], elt['values']);
+}
+
+</script>
diff --git a/gui/bweb/lang/fr/tpl/add_media.tpl b/gui/bweb/lang/fr/tpl/add_media.tpl
new file mode 100644 (file)
index 0000000..852fe57
--- /dev/null
@@ -0,0 +1,40 @@
+
+<div class='titlediv'>
+  <h1 class='newstitle'> Ajouter des Medias</h1>
+</div>
+<div class='bodydiv'>
+   <form action="?" method='get'>
+    <table>
+     <tr><td>Pool :</td>
+         <td> 
+            <select name='pool' size='5' class='formulaire'>
+            <TMPL_LOOP db_pools>
+            <option><TMPL_VAR name></option>
+            </TMPL_LOOP>
+            </select>
+         </td>
+     </tr>
+     <tr><td>Storage :</td> 
+         <td>
+            <select name='storage' size='5' class='formulaire'>
+            <TMPL_LOOP storage>
+            <option><TMPL_VAR name></option>
+            </TMPL_LOOP>
+            </select>
+         </td>
+     </tr>
+     <tr><td>Nombre de média à créer :</td> 
+         <td><input size='3' type='text' name='nb' value='1' class='formulaire'></td>
+     </tr>
+     <tr><td>Numéro de départ :</td> 
+         <td><input size='3' type='text' name='offset' class='formulaire' value='1'></td>
+     </tr>
+     <tr><td>Nom :</td> 
+         <td><input size='8' type='text' name='media' class='formulaire' value='Vol'></td>
+     </tr>
+    </table>
+    <button type="submit" class="bp" name='action' value='add_media'>
+     <img src='/bweb/add.png' alt=''>Ajouter<button>
+   </form>
+</div>
+
diff --git a/gui/bweb/lang/fr/tpl/btime.tpl b/gui/bweb/lang/fr/tpl/btime.tpl
new file mode 100644 (file)
index 0000000..e40b724
--- /dev/null
@@ -0,0 +1,176 @@
+ <div class='titlediv'>
+  <h1 class='newstitle'>Timing Statistics</h1>
+ </div>
+ <div class='bodydiv'>
+<table border='0' valign='top'>
+<td>
+<form name='form1' action='?' method='GET'>
+       <div class="otherboxtitle" valign='top'>
+          Options &nbsp;
+        </div>
+        <div class="otherbox">
+<table border='0'>
+<tr>
+  <td>
+    <h2>Time limits</h2>
+     <table>
+      <tr><td> Begin: </td> <td><input class='formulaire' type='text' 
+           id='iso_begin' name='iso_begin' title='YYYY-MM-DD HH:MM' 
+           <TMPL_IF qiso_begin> value=<TMPL_VAR qiso_begin> </TMPL_IF> 
+           size='16'>
+      </td></tr>
+      <tr><td> End: </td><td> <input type='text' class='formulaire' 
+       id='iso_end' name='iso_end' title='YYYY-MM-DD HH:MM'
+       <TMPL_IF qiso_end> value=<TMPL_VAR qiso_end> </TMPL_IF>
+        size='16'>
+      </td></tr>
+     </table>
+  </td>
+</tr>
+<tr>
+  <td>
+    <h2>Graph</h2>
+      <input type='checkbox' 
+             <TMPL_IF qusage>checked</TMPL_IF> 
+             name="usage"> Drive usage<br/>
+      <input type='checkbox' 
+             <TMPL_IF qpool>checked</TMPL_IF> 
+             name="pool"> Utilisation du pool<br/>
+      <input type='checkbox' 
+             <TMPL_IF qnojob>checked</TMPL_IF> 
+             name="nojob"> Cacher les jobs<br/>
+<TMPL_IF db_client_groups>
+<tr>
+  <td valign='top'>
+    <h2>Groupes</h2>
+    <select name='client_group' size='10' class='formulaire' multiple>
+<TMPL_LOOP db_client_groups>
+       <option id= 'group_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+</TMPL_IF>
+  </td>
+</tr>
+<!--
+  <td valign='top'>
+    <h2>Niveau</h2>
+    <select name='level' class='formulaire'>
+      <option id='level_Any' value='Any'>Tous</option>
+      <option id='level_F' value='F'>Full</option>
+      <option id='level_D' value='D'>Diff&eacute;rentielle</option>
+      <option id='level_I' value='I'>Incr&eacute;mentale</option>
+    </select>     
+  </td><td valign='top'>
+    <h2>Statut</h2>
+    <select name='status' class='formulaire'>
+      <option id='status_Any' value='Any'>Tous</option>
+      <option id='status_T'   value='T'>Ok</option>
+      <option id='status_f'   value='f'>Erreur</option>
+      <option id='status_A'   value='A'>Annul&eacute;</option>
+    </select>   
+  </td>
+</tr>
+<tr>
+  <td valign='top'>
+    <h2>Période</h2>
+    <select name='age' class='formulaire'>
+      <option id='age_604800'   value='604800'>Cette semaine</option>
+      <option id='age_2678400'  value='2678400'>30 derniers jours</option>
+      <option id='age_15552000' value='15552000'>Last 6 months</option>
+    </select>     
+  </td>
+  <td  valign='top'>
+    <h2>Taille</h2>
+     Largeur : &nbsp;<input class='formulaire' type='text' 
+                        name='width' value='<TMPL_VAR width>' size='4'><br/>
+     Hauteur :  <input type='text' class='formulaire' 
+               name='height' value='<TMPL_VAR height>' size='4'><br/>
+  </td>
+</tr>
+<tr>
+  <td valign='top'> 
+    <h2>Clients</h2>
+    <select name='client' size='15' class='formulaire' multiple>
+<TMPL_LOOP NAME=db_clients>
+      <option id='client_<TMPL_VAR clientname>'><TMPL_VAR clientname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+  <td valign='top'> 
+    <h2>Nom du Job</h2>
+    <select name='jobname' size='15' class='formulaire' multiple>
+<TMPL_LOOP NAME=db_jobnames>
+      <option><TMPL_VAR NAME=jobname></option>
+</TMPL_LOOP>
+    </select>
+  </td>
+</tr>
+-->
+<tr>
+<td>
+  <input type='submit' name='action' value='graph' class='formulaire'> 
+</td>
+</tr>
+</table>
+        </div>
+
+</form>
+</td>
+<td>
+
+ <div class="otherboxtitle">
+ Current &nbsp;
+ </div>
+ <div class="otherbox">
+ <img src='<TMPL_VAR result>' alt='Rien n a afficher, essayer avec une autre période'>
+ </div>
+
+</td>
+</table>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+  <TMPL_LOOP qclient_groups>
+     document.getElementById('group_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_LOOP qclients>
+     document.getElementById('client_' + <TMPL_VAR name>).selected = true;
+  </TMPL_LOOP>
+
+  <TMPL_IF status>
+     document.getElementById('status_<TMPL_VAR status>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF level>
+     document.getElementById('level_<TMPL_VAR level>').selected=true;
+  </TMPL_IF>
+
+  <TMPL_IF age>
+     document.getElementById('age_<TMPL_VAR age>').selected=true;
+  </TMPL_IF>
+
+<TMPL_IF qfilesets>
+  for (var i=0; i < document.form1.fileset.length; ++i) {
+  <TMPL_LOOP qfilesets>
+     if (document.form1.fileset[i].value == <TMPL_VAR name>) {
+        document.form1.fileset[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+
+<TMPL_IF qjobnames>
+  for (var i=0; i < document.form1.jobname.length; ++i) {
+  <TMPL_LOOP qjobnames>
+     if (document.form1.jobname[i].value == <TMPL_VAR name>) {
+        document.form1.jobname[i].selected = true;
+     }
+  </TMPL_LOOP>
+  }
+</TMPL_IF>
+</script>
+
diff --git a/gui/bweb/lang/fr/tpl/display_user.tpl b/gui/bweb/lang/fr/tpl/display_user.tpl
new file mode 100644 (file)
index 0000000..8c9445d
--- /dev/null
@@ -0,0 +1,120 @@
+<div class='titlediv'>
+  <h1 class='newstitle'>Utilisateur : <TMPL_VAR username></h1>
+</div>
+<div class='bodydiv'>
+
+<form name="form1" action="?">
+<input type="hidden" value='1' name="create">
+ <table>
+ <tr>
+  <td>Username:</td> <td> <input class="formulaire" type="text" name="username" value='<TMPL_VAR username>'> </td>
+<!-- </tr><tr>
+  <td>Password :</td> <td> <input class="formulaire" type="password" name="passwd" value='<TMPL_VAR passwd>'> </td>
+-->
+ </tr><tr>
+  <td>Commentaire :</td> <td> <input class="formulaire" type="text" name="comment" value='<TMPL_VAR comment>'> </td>
+ </tr><tr>
+  <td>Language:</td> 
+   <td> 
+ <select name="lang" id='lang' class="formulaire">
+  <option id='lang_en' value='en'>English</option>
+  <option id='lang_fr' value='fr'>French</option>
+  <option id='lang_es' value='es'>Spanish</option>
+ </select>
+   </td>
+ </tr><tr>
+<td> Profile :</td><td>
+ <select name="profile" id='profile' class="formulaire">
+  <option onclick='set_role("")'></option>
+  <option onclick='set_role("administrator")'>Administrateur</option>
+  <option onclick='set_role("customer")'>Client</option>
+ </select>
+</td><td>Or like an existing user: </td><td>
+ <select name="copy_username" class="formulaire">
+  <option onclick="disable_sel(false)"></option>
+ <TMPL_LOOP db_usernames>
+  <option title="<TMPL_VAR comment>" onclick="disable_sel(true)" value='<TMPL_VAR username>'><TMPL_VAR username></option>
+ </TMPL_LOOP>
+ </select>
+</td>
+ </tr><tr>
+ </tr><tr>
+<td> Roles :</td><td>
+ <select name="rolename" id='rolename' multiple class="formulaire" size=15>
+ <TMPL_LOOP db_roles>
+  <option title="<TMPL_VAR comment>" value='<TMPL_VAR rolename>' <TMPL_IF userid>selected</TMPL_IF> ><TMPL_VAR rolename></option>
+ </TMPL_LOOP>
+ </select>
+ </td>
+</tr><tr>
+<td> Utiliser les filtres par groupes</td><td>
+<input class="formulaire" onclick="disable_group(this.checked == false)" type="checkbox" name="use_acl" <TMPL_IF use_acl> checked </TMPL_IF> > </td>
+</tr><tr>
+<td> Groupes :</td><td>
+ <select name="client_group" id='client_group' multiple class="formulaire" size=15>
+<TMPL_LOOP db_client_groups>
+        <option id='group_<TMPL_VAR name>'><TMPL_VAR name></option>
+</TMPL_LOOP>
+ </select>
+ </td>
+</tr>
+</table>
+    <button type="submit" class="bp" name='action' value='user_save'>
+     <img src='/bweb/save.png' alt=''> </button>
+</form>
+</div>
+
+<script type="text/javascript" language='JavaScript'>
+
+<TMPL_LOOP client_group>
+    document.getElementById('group_<TMPL_VAR name>').selected = true;
+</TMPL_LOOP>
+
+<TMPL_UNLESS use_acl>
+disable_group(true); 
+</TMPL_UNLESS>
+
+function disable_sel(val) 
+{
+       document.form1.profile.disabled = val;
+       document.form1.rolename.disabled = val;
+}
+function disable_group(val) 
+{
+       document.form1.client_group.disabled = val;
+}
+function set_role(val)
+{
+   if (val == "administrator") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+             document.form1.rolename[i].selected = true;
+       }
+   } else if (val == "production") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+          if (document.form1.rolename[i].value != 'r_configure' &&
+               document.form1.rolename[i].value != 'r_user_mgnt' &&
+               document.form1.rolename[i].value != 'r_group_mgnt'
+               )
+           {
+             document.form1.rolename[i].selected = true;
+           }
+        }
+   } else if (val == "customer") {
+       for (var i=0; i < document.form1.rolename.length; ++i) {
+          if (document.form1.rolename[i].value == 'r_view_stats'   ||
+               document.form1.rolename[i].value == 'r_view_history' ||
+               document.form1.rolename[i].value == 'r_view_log'
+               )
+           {
+             document.form1.rolename[i].selected = true;
+          } else {
+             document.form1.rolename[i].selected = false;
+          }
+       }
+   }
+
+}
+<TMPL_IF lang>
+  document.getElementById('lang_<TMPL_VAR lang>').selected = true;
+</TMPL_IF>
+</script>
diff --git a/gui/bweb/lang/fr/tpl/display_users.tpl b/gui/bweb/lang/fr/tpl/display_users.tpl
new file mode 100644 (file)
index 0000000..58657f3
--- /dev/null
@@ -0,0 +1,63 @@
+<br/>
+ <div class='titlediv'>
+  <h1 class='newstitle'>Utilisateurs</h1>
+ </div>
+ <div class="bodydiv">
+   <form action='?' method='get'>
+    <table id='id<TMPL_VAR ID>'></table>
+    <button type="submit" class="bp" name='action' value='user_add' title='Ajouter'> <img src='/bweb/add.png' alt=''>Ajouter</button>
+    <button type="submit" class="bp" name='action' value='user_del' 
+     onclick="return confirm('Do you want to delete this user ?');" 
+     title='Supprimer'> <img src='/bweb/remove.png' alt=''>Supprimer </button>
+    <button type="submit" class="bp" name='action' value='user_edit' title='Modifier'> <img src='/bweb/edit.png' alt=''>Modifier </button>
+
+    <button type="submit" class="bp" name='action' value='client' title='View clients'> <img src='/bweb/zoom.png' alt=''>View clients</button>
+    <button type="submit" class="bp" name='action' value='job' title='Voir les jobs'> <img src='/bweb/zoom.png' alt=''>Voir les jobs</button>
+   </form>
+ </div>
+
+<script type="text/javascript" language="JavaScript">
+
+var header = new Array("Utilisateur","Sélection");
+
+var data = new Array();
+var chkbox;
+
+<TMPL_LOOP db_usernames>
+
+chkbox = document.createElement('INPUT');
+chkbox.type  = 'radio';
+chkbox.name  = 'username';
+chkbox.value = '<TMPL_VAR username>';
+
+data.push( new Array(
+"<TMPL_VAR username>",
+chkbox
+ )
+);
+</TMPL_LOOP>
+
+nrsTable.setup(
+{
+ table_name:     "id<TMPL_VAR ID>",
+ table_header: header,
+ table_data: data,
+ up_icon: up_icon,
+ down_icon: down_icon,
+ prev_icon: prev_icon,
+ next_icon: next_icon,
+ rew_icon:  rew_icon,
+ fwd_icon:  fwd_icon,
+// natural_compare: false,
+ even_cell_color: even_cell_color,
+ odd_cell_color: odd_cell_color, 
+ header_color: header_color,
+ page_nav: true,
+ padding: 3,
+// disable_sorting: new Array(5,6),
+ rows_per_page: rows_per_page
+}
+);
+</script>
+
+
diff --git a/gui/bweb/lang/fr/tpl/overview.tpl b/gui/bweb/lang/fr/tpl/overview.tpl
new file mode 100644 (file)
index 0000000..9f44534
--- /dev/null
@@ -0,0 +1,117 @@
+<style type="text/css">
+table.sample {
+       border-width: 1px 1px 1px 1px;
+       border-spacing: 3px;
+       border-style: solid solid solid solid;
+       border-color: black black black black;
+       border-collapse: collapse;
+       background-color: white;
+}
+table.sample th {
+       border-width: 1px 1px 1px 1px;
+       padding: 4px 4px 4px 4px;
+       border-style: solid solid solid solid;
+       border-color: gray gray gray gray;
+       background-color: white;
+}
+table.sample td {
+       border-width: 1px 1px 1px 1px;
+       padding: 4px 4px 4px 4px;
+       border-style: solid solid solid solid;
+       border-color: gray gray gray gray;
+       background-color: white;
+}
+</style>
+ <div class='titlediv'>
+  <h1 class='newstitle'> Jobs overview (<TMPL_VAR label>)</h1>
+ </div>
+ <div class='bodydiv'>
+  <table class='sample' id='report'>
+   <tr id='days'><td/>
+  </table>
+ </div>
+
+
+
+<script type="text/javascript" language="JavaScript">
+
+var table = document.getElementById('report');
+var nodate = new Array();
+var nb_col=1;
+var tr; var td; var img; var infos;
+var all = new Array();
+var max_cel=0;
+var min_cel=200;
+
+<TMPL_LOOP items>
+infos = new Array();
+ <TMPL_LOOP events>
+ min_cel=(min_cel< <TMPL_VAR num>)?min_cel:<TMPL_VAR num>;
+ infos[<TMPL_VAR num>] = new Array('<TMPL_VAR num>', '<TMPL_VAR status>', 
+                                   <TMPL_VAR joberrors>, '<TMPL_VAR title>');
+ </TMPL_LOOP>
+max_cel=(max_cel>infos.length)?max_cel:infos.length;
+all.push({ name: "<TMPL_VAR name>", values: infos});
+</TMPL_LOOP>
+
+//infos = new Array();
+//infos[1] = new Array('2007-10-01', 'T', 8);
+//infos[2] = new Array('2007-10-02', 'T', 8);
+//infos[5] = new Array('2007-10-05', 'R', 8);
+//
+//max_cel=(max_cel>infos.length)?max_cel:infos.length;
+//all.push({ name: "zog", values: infos});
+
+function init_tab() // initialize the table
+{
+    for(var j=min_cel; j < max_cel ; j++) {
+       var t=document.createElement("TD");
+       t.setAttribute("id", "day" + j);
+       nodate[j]=1;
+       document.getElementById("days").appendChild(t);
+    }
+}
+
+function add_client(name, infos)
+{
+    tr=document.createElement("TR"); // client row
+    table.appendChild(tr);
+
+    td=document.createElement("TD"); // client name
+    tr.appendChild(td);
+    a=document.createElement("A");
+    a.setAttribute("href", "?action=<TMPL_VAR action>" + name);
+    a.appendChild(document.createTextNode(name));
+    td.appendChild(a);
+    var len = infos.length;
+
+    for(var j=min_cel; j < max_cel ; j++) { // one img for each days
+        td=document.createElement("TD"); 
+        tr.appendChild(td);
+        if (len > j && infos[j]) {
+           if (nodate[j] == 1) { // put the date in the first row if empty
+              var t = document.getElementById("day" + j);
+              t.appendChild(document.createTextNode(infos[j][0]));
+              nodate[j]=0;
+           }
+//         a=document.createElement("A"); // create a link to action=job
+//         a.setAttribute('href', "?action=job;client_group=" + name);
+            img=document.createElement("IMG");
+            img.setAttribute("src", bweb_get_job_img(infos[j][1],infos[j][2]));
+            img.setAttribute("title", infos[j][3]);
+//         a.appendChild(img);
+            td.appendChild(img);
+        } else {
+//            td.appendChild(document.createTextNode('N/A'));
+        }
+    }
+}
+
+init_tab();
+
+for(var i=0; i<all.length; i++) {
+   var elt = all[i];
+   add_client(elt['name'], elt['values']);
+}
+
+</script>