1 |
8 |
ahitrov@rambler.ru |
<!-- Один объект мультимедиа --> |
2 |
|
|
<table cellpadding="0" cellspacing="2" border="0" width="100%"> |
3 |
|
|
<tr><td><b><% $rusname %></b> / <font size="-1" color="#888888">name="<% $attr %>"</font> </td></tr> |
4 |
128 |
ahitrov |
<tr><td><a href="javascript:void(0)" class="mm_act" id="<% $attr %>_file_prompt" style="padding:0 6px;" |
5 |
|
|
onclick="$('#<% $attr %>_url_loader').hide(); $('#<% $attr %>_file_loader').show(); $('#<% $attr %>_file_prompt').addClass('mm_act'); $('#<% $attr %>_url_prompt').removeClass('mm_act'); return false;">file</a> |
6 |
|
|
<a href="javascript:void(0)" class="mm_inact" id="<% $attr %>_url_prompt" style="padding:0 6px;" |
7 |
|
|
onclick="$('#<% $attr %>_file_loader').hide(); $('#<% $attr %>_url_loader').show(); $('#<% $attr %>_url_prompt').addClass('mm_act'); $('#<% $attr %>_file_prompt').removeClass('mm_act'); $('#<% $attr %>_ext_url')[0].focus(); return false;">url</a></div> |
8 |
|
|
<div id="<% $attr %>_file_loader" style="background:#d0d0d0; padding:2px;"> |
9 |
|
|
<input type="file" name="<% $attr %>" style="width:95%;font-family:arial;font-size:9pt;"></div> |
10 |
|
|
<div id="<% $attr %>_url_loader" style="display:none; background:#d0d0d0; padding:2px;"> URL: <input |
11 |
|
|
id="<% $attr %>_ext_url" type="text" name="<% $attr %>.ext_url" style="width:81%;font-family:arial;font-size:9pt;"></div> |
12 |
|
|
</td></tr> |
13 |
347 |
ahitrov |
% if ( exists($MULTI->{filename}) ) { |
14 |
8 |
ahitrov@rambler.ru |
% my $TYPE = 'unknown'; |
15 |
347 |
ahitrov |
% if (length($MULTI->{ext}) > 0) { |
16 |
|
|
% if (-e $keeper->{state}->{mason_comp}.'/contenido/i/icons/'.$MULTI->{ext}.'.gif') { |
17 |
8 |
ahitrov@rambler.ru |
% $TYPE = $MULTI->{ext}; |
18 |
|
|
% } |
19 |
|
|
% } |
20 |
347 |
ahitrov |
<tr><td style="font-size:90%;"><a href="<% $MULTI->{filename} %>" target="_blank"><% $MULTI->{sourcename} || $MULTI->{filename} %></a></td></tr> |
21 |
8 |
ahitrov@rambler.ru |
<tr><td> |
22 |
|
|
|
23 |
|
|
<table border="0" width="100%"><tr> |
24 |
|
|
<td align="right"><a href="<% $MULTI->{filename} %>"><img src="/contenido/i/icons/<% $TYPE %>.gif" width="36" height=36" hspace="5" border="0"></a></td> |
25 |
|
|
<td> |
26 |
347 |
ahitrov |
<font style="font-size:90%" color="#888888">Тип: <% uc($MULTI->{ext}) %><br> |
27 |
8 |
ahitrov@rambler.ru |
Размер: <% int($MULTI->{size}/1024) %> Кб |
28 |
|
|
</font> |
29 |
|
|
</td> |
30 |
|
|
</tr></table> |
31 |
|
|
|
32 |
|
|
</td></tr> |
33 |
|
|
% } |
34 |
|
|
% |
35 |
347 |
ahitrov |
% foreach my $iattr (sort (@{ $iattrs })) { |
36 |
560 |
ahitrov |
% next if ( !ref $iattr && ($iattr eq 'filename') || ($iattr eq 'mini') || ($iattr eq 'width') || ($iattr eq 'height') ); |
37 |
|
|
% if ( ref $iattr eq 'ARRAY' ) { |
38 |
|
|
<tr><td><font size="-1" color="#888888"><% $iattr->[1] %> (<% $iattr->[0] %>):</font></td></tr> |
39 |
|
|
<tr><td><input type="text" name="<% $attr %>.<% $iattr->[0] %>" size="60" value="<% html_escape($MULTI->{$iattr->[0]}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr> |
40 |
|
|
% } elsif ( ref $iattr eq 'HASH' ) { |
41 |
|
|
<tr><td><font size="-1" color="#888888"><% $iattr->{name} %> (<% $iattr->{attr} %>):</font></td></tr> |
42 |
|
|
<tr><td><input type="text" name="<% $attr %>.<% $iattr->{attr} %>" size="60" value="<% html_escape($MULTI->{$iattr->{attr}}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr> |
43 |
|
|
% } else { |
44 |
8 |
ahitrov@rambler.ru |
<tr><td><font size="-1" color="#888888"><% $ATTRNAMES->{$iattr} %> (<% $iattr %>):</font></td></tr> |
45 |
|
|
<tr><td><input type="text" name="<% $attr %>.<% $iattr %>" size="60" value="<% html_escape($MULTI->{$iattr}) %>" style="width:95%;font-family:arial;font-size:9pt;"></td></tr> |
46 |
560 |
ahitrov |
% } |
47 |
8 |
ahitrov@rambler.ru |
% } |
48 |
|
|
<tr><td><input type="checkbox" name="_delete_multi.<% $attr %>" value="1">Удалить<br><br></td></tr> |
49 |
|
|
</td></tr></table> |
50 |
|
|
|
51 |
|
|
<%ARGS> |
52 |
|
|
|
53 |
|
|
$MULTI => undef |
54 |
|
|
$rusname => undef |
55 |
|
|
$attr => undef |
56 |
|
|
$prop => {} |
57 |
|
|
|
58 |
|
|
</%ARGS> |
59 |
|
|
<%DOC> |
60 |
|
|
|
61 |
|
|
Компонента отображает одну картинку... |
62 |
|
|
|
63 |
|
|
</%DOC> |
64 |
|
|
<%INIT> |
65 |
|
|
|
66 |
|
|
my $iattrs = $prop->{iattrs}; |
67 |
560 |
ahitrov |
$iattrs = ['alt'] unless $iattrs; |
68 |
8 |
ahitrov@rambler.ru |
|
69 |
|
|
my $ATTRNAMES = { |
70 |
347 |
ahitrov |
'alt' => 'Название', |
71 |
8 |
ahitrov@rambler.ru |
'btext' => 'Текст до картинки', |
72 |
|
|
'atext' => 'Текст после картинки', |
73 |
|
|
'url' => 'Ссылка с картинки', |
74 |
|
|
'copyright' => 'Копирайт', |
75 |
|
|
}; |
76 |
|
|
|
77 |
|
|
</%INIT> |