~critecia/critecia/trunk

« back to all changes in this revision

Viewing changes to src/app/views/groups/view.ctp

  • Committer: Christian A. Reiter
  • Date: 2011-11-16 20:08:35 UTC
  • Revision ID: christian.a.reiter@gmail.com-20111116200835-h3xx0ekm47lububw
fixed jQuery file links

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 /**
3
 
 *    This file is part of Critecia
4
 
 *    Copyright (C) 2011 Christian A. Reiter
5
 
 *
6
 
 *    This program is free software: you can redistribute it and/or modify
7
 
 *    it under the terms of the GNU Affero General Public License as
8
 
 *    published by the Free Software Foundation, either version 3 of the
9
 
 *    License, or (at your option) any later version.
10
 
 *
11
 
 *    This program is distributed in the hope that it will be useful,
12
 
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 *    GNU Affero General Public License for more details.
15
 
 *
16
 
 *    You should have received a copy of the GNU Affero General Public License
17
 
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 
 */
19
 
?>
20
 
 
21
 
<div class="groups _view">
22
 
        <h2><?php  
23
 
                if($current_hospital) { 
24
 
                        echo $current_hospital['Hospital']['shortname'] . ' | Gruppe '. $group['Group']['name'];
25
 
                        $hospital_id = $current_hospital['Hospital']['id'];
26
 
                } else {
27
 
                        echo 'Gruppe '. $group['Group']['name'];
28
 
                        $hospital_id = false;
29
 
                }
30
 
        ?>
31
 
        </h2>
32
 
 
33
 
        <div class="viewblock">
34
 
                <div class="viewblock_title">GRUPPENEINGENSCHAFTEN</div>
35
 
                <ul>
36
 
                <?php
37
 
                        // can I see hidden groups?
38
 
                        if($accessControl->check('Groups/see_hidden')) {
39
 
                                if($group['Group']['hidden']) { // is group hidden? or am I SuperAdmin?
40
 
                                        echo '<li>versteckt</li>' ;
41
 
                                }
42
 
                        }
43
 
                        
44
 
                        //no hospital_id means global group
45
 
                        if(!$group['Group']['hospital_id']) {
46
 
                                echo '<li>global, keinem Krankenhaus zugeordnet</li>';
47
 
                        } else {
48
 
                                echo '<li>krankenhausspezifisch</li>';
49
 
                        }
50
 
                        
51
 
                ?>
52
 
                </ul>
53
 
        </div>
54
 
        <div class="viewblock">
55
 
                <div class="viewblock_title">BENUTZER</div>
56
 
 
57
 
                <?php if(!empty($group['User'])):?>
58
 
                <table cellpadding = "0" cellspacing = "0">
59
 
                        <tr>
60
 
                                <th>Titel</th>
61
 
                                <th>Vorname</th>
62
 
                                <th>Nachname</th>
63
 
                                <th>Geburtsdatum</th>
64
 
                                <th>Benutzername</th>
65
 
                                <th>Enabled</th>
66
 
                                <th>Aktiv</th>
67
 
                                <th class="edit"></th>
68
 
                        </tr>
69
 
                        <?php
70
 
                                $i = 0;
71
 
                                foreach ($group['User'] as $user):
72
 
                                ?>
73
 
                                <tr>
74
 
                                        <td><?php echo $user['title'];?></td>
75
 
                                        <td><?php echo $user['firstname'];?></td>
76
 
                                        <td><?php echo $user['lastname'];?></td>
77
 
                                        <td><?php echo $user['birthdate'];?></td>
78
 
                                        <td><?php echo $user['username'];?></td>
79
 
                                        <td><?php echo $user['enabled'];?></td>
80
 
                                        <td><?php echo $user['active'];?></td>
81
 
                                        <td class="edit"><?php
82
 
                                                //echo $this->Html->link(__('View', true), array('controller' => 'users', 'action' => 'view', $user['id'])); 
83
 
                                                //echo $this->Html->link(__('Edit', true), array('controller' => 'users', 'action' => 'edit', $user['id'])); 
84
 
#                                               echo $this->Html->link($html->image('22x22/actions/user-delete.png'), 
85
 
#                                                               array('controller' => 'groups', 'action' => 'remove_user', $group['Group']['id'], $user['id']), 
86
 
#                                                               array('escape' => false, 'title' => 'Benutzer aus Gruppe entfernen'), 
87
 
#                                                               'Benutzer '.$user['id'].' wirklich aus Gruppe entfernen?'); 
88
 
                                        ?></td>
89
 
                                </tr>
90
 
                        <?php endforeach; ?>
91
 
                </table>
92
 
                <?php else: ?>  
93
 
                        Diese Gruppe enthält keine Benutzer.
94
 
                <?php endif; ?>
95
 
        </div>
96
 
</div>