%#============================================================================ %# ePortal - WEB Based daily organizer %# Author - S.Rusakov %# %# Copyright (c) 2000-2003 Sergey Rusakov. All rights reserved. %# This program is free software; you can redistribute it %# and/or modify it under the same terms as Perl itself. %# %# %#---------------------------------------------------------------------------- %# %# $gdata{OffPhones_found_count} - Number of rows found in subcomponent %#---------------------------------------------------------------------------- <& /message.mc &> <% empty_table( height => 10 ) %> <% empty_td(width=>5) %>
<% $sd->draw_dialog %> % if (! $session{AppOffPhones_EditMode}) { <% pick_lang(rus => q{ Для поиска введите фамилию, номер телефона или любую часть из наименования подразделения и нажмите кнопку «Искать». }, eng => q{ Enter a part of name, department name or phone number to search a man. }) %> % } % if (defined $session{AppOffPhones_EditMode}) { <& SELF:TurnEditMode &> % }
% foreach my $dpt (@Departments) { <& dring.htm, deptid => $dpt, name => $name &> % $m->flush_buffer; <& person.htm, deptid => $dpt, name => $name &> % $m->flush_buffer; % if ( ! $name) { <& subdpt.htm, deptid => $dpt, name => $name &> % $m->flush_buffer; <& dring.htm, deptid => $dpt, name => $name &> % $m->flush_buffer; % } %}

%#=== @metags init ========================================================= <%init> my $sd = new ePortal::App::OffPhones::SearchDialog; my @Departments; if ($name =~ /[0123456789\- \.,]+/) { $name =~ tr/-\., //d; } if ($name) { $sd->Name($name); my $OffPhones = ePortal::App::OffPhones::stSearchDistinctDepartment($name); while($OffPhones->restore_next) { push @Departments, $OffPhones->id; } $session{ErrorMessage} = pick_lang( rus => "Нет никого такого ...", eng => "No such entry ...") if ! @Departments; } push @Departments, $deptid if (! scalar @Departments); %#=== @METAGS args ========================================================= <%args> $deptid => 0 $name => undef %#=== @METAGS TurnEditMode ==================================================== <%method TurnEditMode> % my %args = $m->request_args;
% if ($session{AppOffPhones_EditMode}) { <% pick_lang(rus => "Выключить", eng => "Turn off") %> <% pick_lang(rus => "режим редактирования.", eng => "edit mode") %>
<% pick_lang(rus => q{ Список замечаний от пользователей.
Редактор типов телефонов. }, eng => q{ A list of users remarks.
Editor of phone types. }) %> % } else { <% pick_lang( rus => "Вы обладаете правами на изменение данных в телефонном справочнике. Для этого надо", eng => "Your are able to edit phone directory. To do it") %> <% pick_lang(rus => "включить режим редактировани", eng => "click here") %>. % }