Revision 452

Date:
2014/11/27 11:59:16
Author:
ahitrov
Revision Log:
It can be possible to set tab names for project and plugin tabs
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/components/class_filter.msn

     
    5 5 <tr bgcolor="#efefef">
    6 6 <th align="center" width="1%">N</th>
    7 7 <th colspan=2>Название</th>
    8 </tr>
    8 9 % my $serial=0;
    9 10 % foreach my $local_class (sort {$a->class_name cmp $b->class_name} @{ $user->get_available_classes }) {
    10 11 % $serial++;
  • utf8/core/comps/contenido/components/header.msn

     
    26 26 % my $l_plugin = lc($plugin);
    27 27 % next if $state->{$l_plugin}->{contenido_notab};
    28 28 % my $uri = "$plugin/";
    29 % if ($plugin eq $state->project)
    30 % {
    31 % $plugin = $state->project_name;
    29 % my $tab_name;
    30 % if (exists $state->{$plugin}{tab_name} && $state->{$plugin}{tab_name}) {
    31 % $tab_name = $state->{$plugin}{tab_name};
    32 % } elsif ($plugin eq $state->project) {
    33 % $tab_name = $state->project_name;
    34 % } else {
    35 % $tab_name = $plugin;
    32 36 % }
    33 37 % my ($b1, $b2) = $r->uri =~ /^\/contenido\/(\w+)\//i && lc($1) eq $l_plugin ? ('<b>','</b>') : ('','');
    34 &nbsp;|&nbsp;<a href="/contenido/<% $uri %>"><% $b1.$plugin.$b2 %></a>
    38 &nbsp;|&nbsp;<a href="/contenido/<% $uri %>"><% $b1.$tab_name.$b2 %></a>
    35 39 % }
    36 40 </td>
    37 41 <td align="right">
  • utf8/core/skel/plugin/lib/plugin/State.pm.proto

     
    14 14 # configured
    15 15 $self->{debug} = (lc('@DEBUG@') eq 'yes');
    16 16 $self->{project} = '@PROJECT@';
    17 $self->{contenido_notab} = 0;
    18 $self->{tab_name} = '@NAME@';
    17 19
    18 20 # зашитая конфигурация плагина
    19 21 $self->{db_type} = 'none'; ### For REAL database use 'remote'
     
    63 65 $self->{attributes}->{$_} = 'SCALAR' for qw(
    64 66 debug
    65 67 project
    68 tab_name
    66 69
    67 70 db_type
    68 71 db_keepalive
  • utf8/core/skel/project/lib/project/State.pm.proto

     
    24 24 ## $self->{variable_name} = 'VARIABLE_NAME_SURROUNDED_BY_@@';
    25 25
    26 26 $self->{contenido_notab} = 1;
    27 $self->{tab_name} = '@PROJECT_NAME@';
    27 28
    28 29 $self->_init_();
    29 30
     
    55 56 ## Здесь список параметров, указанных в new()
    56 57 foreach my $attribute ( qw(
    57 58 contenido_notab
    59 tab_name
    58 60 ) )
    59 61 {
    60 62 $self->{attributes}->{ $attribute } = 'SCALAR';