Пример #1
0
 public function action_sync()
 {
     $diff_data = $this->get_structure_difference();
     foreach ($diff_data['to_add'] as $tname) {
         $this->create_table($tname);
     }
     foreach ($diff_data['to_change'] as $alias) {
         $this->sync_table($alias);
     }
     Request::current()->redirect(Cms_Urlmanager::get_tools_url('structure'));
 }
Пример #2
0
                            <?php 
    echo Form::select('align', $align, $column['align'], array('class' => 'form-control input-sm'));
    ?>
                        </div>                    
                    </div>
                </div>      
            </div>   
        </div>
        
        <hr />
        <?php 
}
?>
    </div> 
    <a href="<?php 
echo Cms_Urlmanager::get_tools_url('structure');
?>
" class=""><< Назад к списку таблиц</a>
</div>



<!-- Modal Validation Rules -->
<div class="modal fade" id="validationRulesModal" tabindex="-1" role="dialog" aria-labelledby="validationRulesModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <form id="validationRulesForm" action="" method="">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Закрыть</span></button>
                    <h4 class="modal-title">Правила валидации</h4>
                </div>
Пример #3
0
 public function action_delete_table()
 {
     try {
         $tables = $this->request->post('tables');
         if (Arr::is_array($tables)) {
             foreach ($tables as $alias) {
                 $table = Cms_Structure::factory($alias);
                 if ($table != NULL) {
                     unlink($table->get_file_name());
                 }
             }
         }
         $this->add_result_data('urlToRedirect', Cms_Urlmanager::get_tools_url('structure'));
     } catch (Exception $exc) {
         $this->set_error($exc->getMessage());
     }
 }
Пример #4
0
                        </div>
                    </div>                       
                </div>                  
                <?php 
}
?>
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
        <button id="importBtn" type="button" class="btn btn-default pull-right">
            <span class="fa fa-upload fa-fw"></span> 
            Импорт
        </button>
        <a id="syncBtn" href="<?php 
echo Cms_Urlmanager::get_tools_url('sync');
?>
" class="btn btn-default" title="Синхронизировать">
            <span class="fa fa-exchange"></span>
            Синхронизация
        </a> 
        

        <?php 
if (count($tables_to_add) > 0) {
    ?>
        <div class="panel panel-default" style="margin-top: 30px;">
            <div class="panel-heading">
                Найдены новые таблицы:
            </div>  
            <div class="panel-body">