Changeset 151


Ignore:
Timestamp:
05/21/09 01:09:14 (15 years ago)
Author:
nanardon
Message:
  • improve add field in forms
  • complete menu
Location:
LATMOS-Accounts-Web
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm

    r148 r151  
    1919    uidNumber => [ 'UID' ], 
    2020    gidNumber => [ 'GID', 'select:group:gidNumber' ], 
     21    manager => [ 'Responsable', 'select-N:user:uid' ], 
    2122    sn => [ 'Nom' ], 
    2223    givenName => [ 'Prénom' ], 
     
    3031    postalCode => [ 'Code postal' ], 
    3132    postOfficeBox => [ 'BP' ], 
    32     department => [ 'Département' ], 
     33    department => [ 'Département', 'select-N:department' ], 
    3334    streetAddress => [ 'Rue', 'textarea' ], 
    3435    st => [ 'Etat' ], 
     
    6465        attrs => [ qw( 
    6566            company 
     67            manager 
    6668            department 
    6769            title 
     
    8082    cell => { 
    8183        name => 'Cellule', 
    82         attrs => [qw(description) ], 
     84        attrs => [qw(description manager) ], 
    8385    }, 
    8486    department => { 
    8587        name => 'Département', 
    86         attrs => [qw(description) ], 
     88        attrs => [qw(description manager) ], 
    8789    }, 
    8890    team => { 
     
    178180            $self->attr_raw_value($attr) 
    179181        ); 
    180         /^select:([^:]+):(.*)$/ and do { 
    181             my $otype = $1; 
    182             my $keyfield = $2; 
     182        /^select(-\w+)?:([^:]+)(?::(.*))?$/ and do { 
     183            my $options = $1 || ''; 
     184            my $otype = $2; 
     185            my $keyfield = $3; 
    183186            my $select = sprintf('<select name="%s">', 
    184187                $self->escape($attr)) . "\n"; 
    185             my $value = $self->attr_raw_value($attr); 
     188            $select .= '<option value="">--</option>' . "\n" if ($options =~ /N/); 
     189            my $value = $self->attr_raw_value($attr) || ''; 
    186190            foreach my $id ($self->base->list_objects($otype)) { 
    187191                my $obj = $self->base->get_object($otype, $id) or next; 
  • LATMOS-Accounts-Web/root/html/cells/index.tt

    r148 r151  
    3131 
    3232<table border="0"> 
     33<table border="0"> 
     34<tr><td colspan="2">[% cellslist.size %] Cellules</td></tr> 
     35<tr><th>Nom</th><th>Description</th></tr> 
    3336[% FOREACH cellname = cellslist %] 
    3437[% cell = db.get_object('cell', cellname) %] 
     
    3639    <td>[% cell.get_c_field('name') | html %]</td> 
    3740    <td> 
    38         [% cell.get_c_field('l') | html %] 
     41        [% cell.get_c_field('description') | truncate(30) | html %] 
    3942    <a href="[% c.uri_for('/cells', cellname) %]"> 
    4043        <img src="[% c.uri_for('/static', 'icons', 'arrow-right.png') %]" 
  • LATMOS-Accounts-Web/root/html/departments/index.tt

    r148 r151  
    3131 
    3232<table border="0"> 
     33<table border="0"> 
     34<tr><td colspan="2">[% departmentslist.size %] Départements</td></tr> 
     35<tr><th>Nom</th><th>Description</th></tr> 
    3336[% FOREACH departmentname = departmentslist %] 
    3437[% department = db.get_object('department', departmentname) %] 
     
    3639    <td>[% department.get_c_field('name') | html %]</td> 
    3740    <td> 
    38         [% department.get_c_field('l') | html %] 
     41        [% department.get_c_field('description') | truncate(30) | html %] 
    3942    <a href="[% c.uri_for('/departments', departmentname) %]"> 
    4043        <img src="[% c.uri_for('/static', 'icons', 'arrow-right.png') %]" 
  • LATMOS-Accounts-Web/root/html/includes/header.tt

    r134 r151  
    2121    <p><a href="[% c.uri_for('/users') %]">Utilisateurs</a></p> 
    2222    <p><a href="[% c.uri_for('/groups') %]">Groupes</a></p> 
     23    <p><a href="[% c.uri_for('/departments') %]">Département</a></p> 
     24    <p><a href="[% c.uri_for('/teams') %]">Équipes</a></p> 
     25    <p><a href="[% c.uri_for('/cells') %]">Cellules</a></p> 
    2326    <p><a href="[% c.uri_for('/sites') %]">Sites</a></p> 
    2427</div> 
  • LATMOS-Accounts-Web/root/html/sites/index.tt

    r134 r151  
    3131 
    3232<table border="0"> 
     33<table border="0"> 
     34<tr><td colspan="2">[% siteslist.size %] Sites</td></tr> 
     35<tr><th>Nom</th><th>Ville</th></tr> 
    3336[% FOREACH sitename = siteslist %] 
    3437[% site = db.get_object('site', sitename) %] 
  • LATMOS-Accounts-Web/root/html/teams/index.tt

    r148 r151  
    3131 
    3232<table border="0"> 
     33<table border="0"> 
     34<tr><td colspan="2">[% teamslist.size %] Équipes</td></tr> 
     35<tr><th>Nom</th><th>Description</th></tr> 
    3336[% FOREACH teamname = teamslist %] 
    3437[% team = db.get_object('team', teamname) %] 
     
    3639    <td>[% team.get_c_field('name') | html %]</td> 
    3740    <td> 
    38         [% team.get_c_field('l') | html %] 
     41        [% team.get_c_field('description') | truncate(30) | html %] 
    3942    <a href="[% c.uri_for('/teams', teamname) %]"> 
    4043        <img src="[% c.uri_for('/static', 'icons', 'arrow-right.png') %]" 
Note: See TracChangeset for help on using the changeset viewer.