/[A3C]/lib/A3C/View/Strix.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/A3C/View/Strix.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 174 by dpavlin, Mon Jun 16 16:48:16 2008 UTC revision 183 by dpavlin, Mon Jun 16 21:33:59 2008 UTC
# Line 53  template 'name_diff' => page { Line 53  template 'name_diff' => page {
53    
54          title is _('Strix name differences');          title is _('Strix name differences');
55    
56            render_region(
57                    name => 'selected-instances',
58                    path => '/strix/selected-instances'
59            );
60    
61          my $name_diff = A3C::SQL->new({ query => qq{          my $name_diff = A3C::SQL->new({ query => qq{
62                  select                  select
63                          instance,hreduorgurl,                          instance,hreduorgurl,
# Line 66  template 'name_diff' => page { Line 71  template 'name_diff' => page {
71    
72                  table {                  table {
73                          row {                          row {
74                                    th {}
75                                  th { _('Instance') }                                  th { _('Instance') }
76                                  th { _('Strix instance name') }                                  th { _('Strix instance name') }
77                                  th { _('hrEduOrg.o') }                                  th { _('hrEduOrg.o') }
78                          };                          };
79                          while ( my $row = $name_diff->next ) {                          while ( my $row = $name_diff->next ) {
80                                  row {                                  row {
81                                          cell { hyperlink( url => 'http://' . $row->hreduorgurl, label => $row->instance ) }                                          cell { show( 'instance-op', 'Create', '+', $row->instance ) }
82                                            cell { $row->instance }
83                                          cell { $row->_site_name }                                          cell { $row->_site_name }
84                                          cell { $row->o }                                          cell { $row->o }
85                                  }                                  }
# Line 120  template 'sitemap' => page { Line 127  template 'sitemap' => page {
127    
128          title is _('Sitemap');          title is _('Sitemap');
129    
130            render_region(
131                    name => 'selected-instances',
132                    path => '/strix/selected-instances'
133            );
134    
135          my $site_id = get('site_id') || 1;          my $site_id = get('site_id') || 1;
136    
137          my $sitemap = strix->site_navigation( $site_id );          my $sitemap = strix->site_navigation( $site_id );
# Line 145  template 'sitemap' => page { Line 157  template 'sitemap' => page {
157                  ul {                  ul {
158                          foreach my $p ( @{ $c->{children} } ) {                          foreach my $p ( @{ $c->{children} } ) {
159                                  li {                                  li {
160                                            { class is $p->{class} };
161                                          full_url( $p );                                          full_url( $p );
162                                          children( $p );                                          children( $p );
163                                  }                                  }
# Line 209  template 'execute-sql' => sub { Line 222  template 'execute-sql' => sub {
222                  sticky_on_success => 1,                  sticky_on_success => 1,
223                  sticky_on_failure => 1,                  sticky_on_failure => 1,
224                  arguments => {                  arguments => {
225                          strix => get('strix')                          instance => get('instance')
226                  }                  }
227          );          );
228    
229          form {          form {
230                  render_action( $action => [ 'strix', 'sql' ] );                  render_action( $action => [ 'instance', 'sql' ] );
231                  form_submit( label => _('Execute SQL') );                  form_submit( label => _('Execute SQL') );
232          };          };
233    
# Line 317  template 'selected-instances' => sub { Line 330  template 'selected-instances' => sub {
330    
331          if ( $selected->count > 0 ) {          if ( $selected->count > 0 ) {
332    
333                  div { _('%1 instances selected', $selected->count ) }                  div { _('%1 instances selected', $selected->count ) };
334                  table {                  table {
335                          while (my $s = $selected->next) {                          while (my $s = $selected->next) {
336                                  row {                                  row {
337                                          cell { tt { $s->strix->instance } }                                          cell { tt {
338                                          cell { $s->strix->_site_name }                                                  hyperlink(
339                                          cell { show( 'instance-op', 'Delete', '-', $s->strix->instance ) }                                                          url => '?instance=' . $s->instance->instance,
340                                                            label => $s->instance->instance
341                                                    )
342                                            } }
343                                            cell { $s->instance->_site_name }
344                                            cell { show( 'instance-op', 'Delete', '-', $s->instance->instance ) }
345                                  }                                  }
346                          }                          }
347                  }                  }

Legend:
Removed from v.174  
changed lines
  Added in v.183

  ViewVC Help
Powered by ViewVC 1.1.26