当前位置: 首页>>代码示例>>PHP>>正文


PHP CMS_Asset::add_css方法代码示例

本文整理汇总了PHP中CMS_Asset::add_css方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS_Asset::add_css方法的具体用法?PHP CMS_Asset::add_css怎么用?PHP CMS_Asset::add_css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMS_Asset的用法示例。


在下文中一共展示了CMS_Asset::add_css方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exit

<h3>Master Data Riwayat Pangkat</h3>
<?php 
if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
$asset = new CMS_Asset();
foreach ($css_files as $file) {
    $asset->add_css($file);
}
echo $asset->compile_css();
foreach ($js_files as $file) {
    $asset->add_js($file);
}
echo $asset->compile_js();
echo $output;
开发者ID:heruprambadi,项目名称:simpeg,代码行数:15,代码来源:manage_his_pangkat_view.php

示例2:

    <head>
        <meta charset="utf-8">
        <title><?php 
echo $template['title'];
?>
</title>
        <?php 
echo $template['metadata'];
?>
        <link rel="icon" href="{{ site_favicon }}">
        <!-- Le styles -->
        <?php 
echo $template['css'];
$asset = new CMS_Asset();
if ($__is_bootstrap_cdn_connected) {
    $asset->add_css('//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css');
} else {
    $asset->add_cms_css('bootstrap/css/bootstrap.min.css');
}
$asset->add_themes_css('bootstrap.min.css', '{{ used_theme }}', 'default');
$asset->add_themes_css('style.css', '{{ used_theme }}', 'default');
echo $asset->compile_css();
?>
        <!-- Le fav and touch icons -->
        <link rel="shortcut icon" href="{{ site_favicon }}">
        <style type="text/css">{{ widget_name:section_custom_style }}</style>
    </head>
    <body>
        <?php 
echo $template['js'];
if ($__is_bootstrap_cdn_connected) {
开发者ID:kevinmel2000,项目名称:ci_webblog,代码行数:31,代码来源:slide.php

示例3: index


//.........这里部分代码省略.........
     // $crud->unset_add();
     // $crud->unset_edit();
     // $crud->unset_list();
     // $crud->unset_back_to_list();
     // $crud->unset_print();
     // $crud->unset_export();
     // set model
     // $crud->set_model($this->cms_module_path().'/grocerycrud_main_language_model');
     // adjust groceryCRUD's language to No-CMS's language
     $crud->set_language($this->cms_language());
     // table name
     $crud->set_table(cms_table_name('main_language'));
     // set subject
     $crud->set_subject('Language');
     // displayed columns on list
     $crud->columns('name', 'code', 'iso_code', 'translations');
     // displayed columns on edit operation
     $crud->edit_fields('name', 'code', 'iso_code', 'translations');
     // displayed columns on add operation
     $crud->add_fields('name', 'code', 'iso_code', 'translations');
     // caption of each columns
     $crud->display_as('name', 'Name');
     $crud->display_as('iso_code', 'ISO Code');
     $crud->display_as('translations', 'Translations');
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put required field validation codes here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/required_fields)
     // eg:
     //      $crud->required_fields( $field1, $field2, $field3, ... );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud->required_fields('name', 'code');
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put required field validation codes here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/unique_fields)
     // eg:
     //      $crud->unique_fields( $field1, $field2, $field3, ... );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud->unique_fields('name', 'code', 'iso_code');
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put field validation codes here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/set_rules)
     // eg:
     //      $crud->set_rules( $field_name , $caption, $filter );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put set relation (lookup) codes here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/set_relation)
     // eg:
     //      $crud->set_relation( $field_name , $related_table, $related_title_field , $where , $order_by );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put set relation_n_n (detail many to many) codes here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/set_relation_n_n)
     // eg:
     //      $crud->set_relation_n_n( $field_name, $relation_table, $selection_table, $primary_key_alias_to_this_table,
     //          $primary_key_alias_to_selection_table , $title_field_selection_table, $priority_field_relation );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put custom field type here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/field_type)
     // eg:
     //      $crud->field_type( $field_name , $field_type, $value  );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put callback here
     // (documentation: httm://www.grocerycrud.com/documentation/options_functions)
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud->callback_before_insert(array($this, '_before_insert'));
     $crud->callback_before_update(array($this, '_before_update'));
     $crud->callback_before_delete(array($this, '_before_delete'));
     $crud->callback_after_insert(array($this, '_after_insert'));
     $crud->callback_after_update(array($this, '_after_update'));
     $crud->callback_after_delete(array($this, '_after_delete'));
     $crud->callback_column('translations', array($this, '_callback_column_translations'));
     $crud->callback_field('translations', array($this, '_callback_field_translations'));
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put custom error message here
     // (documentation: httm://www.grocerycrud.com/documentation/set_lang_string)
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // $crud->set_lang_string('delete_error_message', 'Cannot delete the record');
     // $crud->set_lang_string('update_error',         'Cannot edit the record'  );
     // $crud->set_lang_string('insert_error',         'Cannot add the record'   );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // render
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $output = $crud->render();
     // prepare css & js, add them to config
     $config = array();
     $asset = new CMS_Asset();
     foreach ($output->css_files as $file) {
         $asset->add_css($file);
     }
     $config['css'] = $asset->compile_css();
     foreach ($output->js_files as $file) {
         $asset->add_js($file);
     }
     $config['js'] = $asset->compile_js();
     // show the view
     $this->view($this->cms_module_path() . '/language/manage_main_language_view', $output, $this->cms_complete_navigation_name('main_language_management'), $config);
 }
开发者ID:kevinmel2000,项目名称:ci_webblog,代码行数:101,代码来源:language_management.php

示例4: config

 public function config()
 {
     $this->cms_guard_page('main_config_management');
     $crud = $this->new_crud();
     $crud->unset_jquery();
     $crud->set_table(cms_table_name('main_config'));
     $crud->set_subject($this->cms_lang('Configuration'));
     $crud->unique_fields('config_name');
     $crud->unset_read();
     $crud->unset_delete();
     $crud->columns('config_name', 'value');
     $crud->edit_fields('config_name', 'value', 'description');
     $crud->add_fields('config_name', 'value', 'description');
     $crud->display_as('config_name', 'Configuration Key')->display_as('value', 'Configuration Value')->display_as('description', 'Description');
     $crud->unset_texteditor('description');
     $crud->unset_texteditor('value');
     $operation = $crud->getState();
     if ($operation == 'edit' || $operation == 'update' || $operation == 'update_validation') {
         $crud->field_type('config_name', 'readonly');
         $crud->field_type('description', 'readonly');
     } else {
         if ($operation == 'add' || $operation == 'insert' || $operation == 'insert_validation') {
             //$crud->set_rules('config_name', 'Configuration Key', 'required');
             $crud->required_fields('config_name');
         }
     }
     $crud->callback_after_insert(array($this, 'after_insert_config'));
     $crud->callback_after_update(array($this, 'after_update_config'));
     $crud->callback_before_delete(array($this, 'before_delete_config'));
     $crud->set_language($this->cms_language());
     $output = $crud->render();
     // prepare css & js, add them to config
     $config = array();
     $asset = new CMS_Asset();
     foreach ($output->css_files as $file) {
         $asset->add_css($file);
     }
     $config['css'] = $asset->compile_css();
     foreach ($output->js_files as $file) {
         $asset->add_js($file);
     }
     $config['js'] = $asset->compile_js();
     // show the view
     $this->view('main/main_config', $output, 'main_config_management', $config);
 }
开发者ID:kevinmel2000,项目名称:ci_webblog,代码行数:45,代码来源:main.php

示例5: index

 public function index()
 {
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // initialize groceryCRUD
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud = $this->new_crud();
     $crud->unset_jquery();
     $crud->unset_print();
     $crud->unset_export();
     // set model
     // $crud->set_model($this->cms_module_path().'/grocerycrud_category_model');
     // adjust groceryCRUD's language to No-CMS's language
     $crud->set_language($this->cms_language());
     // table name
     $crud->set_table($this->cms_complete_table_name('category'));
     // set subject
     $crud->set_subject('Category');
     // displayed columns on list
     $crud->columns('category_name', 'description', 'articles');
     // displayed columns on edit operation
     $crud->edit_fields('category_name', 'description', 'articles');
     // displayed columns on add operation
     $crud->add_fields('category_name', 'description', 'articles');
     // required field
     $crud->required_fields('category_name');
     $crud->unique_fields('category_name');
     $crud->unset_read();
     // caption of each columns
     $crud->display_as('category_name', 'Category Name');
     $crud->display_as('description', 'Description');
     $crud->display_as('articles', 'Articles');
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put set relation (lookup) codes here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/set_relation)
     // eg:
     // 		$crud->set_relation( $field_name , $related_table, $related_title_field , $where , $order_by );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put set relation_n_n (detail many to many) codes here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/set_relation_n_n)
     // eg:
     // 		$crud->set_relation_n_n( $field_name, $relation_table, $selection_table, $primary_key_alias_to_this_table,
     // 			$primary_key_alias_to_selection_table , $title_field_selection_table, $priority_field_relation );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud->set_relation_n_n('articles', $this->cms_complete_table_name('category_article'), $this->cms_complete_table_name('article'), 'category_id', 'article_id', 'article_title', NULL);
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put custom field type here
     // (documentation: http://www.grocerycrud.com/documentation/options_functions/field_type)
     // eg:
     // 		$crud->field_type( $field_name , $field_type, $value  );
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud->unset_texteditor('description');
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // HINT: Put callback here
     // (documentation: httm://www.grocerycrud.com/documentation/options_functions)
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud->callback_before_insert(array($this, 'before_insert'));
     $crud->callback_before_update(array($this, 'before_update'));
     $crud->callback_before_delete(array($this, 'before_delete'));
     $crud->callback_after_insert(array($this, 'after_insert'));
     $crud->callback_after_update(array($this, 'after_update'));
     $crud->callback_after_delete(array($this, 'after_delete'));
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // render
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $output = $crud->render();
     // prepare css & js, add them to config
     $config = array();
     $asset = new CMS_Asset();
     foreach ($output->css_files as $file) {
         $asset->add_css($file);
     }
     $config['css'] = $asset->compile_css();
     foreach ($output->js_files as $file) {
         $asset->add_js($file);
     }
     $config['js'] = $asset->compile_js();
     // show the view
     $this->view($this->cms_module_path() . '/manage_category_view', $output, $this->cms_complete_navigation_name('manage_category'), $config);
 }
开发者ID:kevinmel2000,项目名称:ci_webblog,代码行数:80,代码来源:manage_category.php

示例6: video

 public function video()
 {
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // initialize groceryCRUD
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $crud = $this->new_crud();
     $crud->unset_edit();
     $crud->unset_jquery();
     $crud->unset_print();
     $crud->unset_export();
     // adjust groceryCRUD's language to No-CMS's language
     $crud->set_language($this->cms_language());
     // table name
     $crud->set_table($this->cms_complete_table_name('video'));
     // set subject
     $crud->set_subject('Video');
     // displayed columns on list
     $crud->columns('nama', 'link');
     // displayed columns on add operation
     $crud->add_fields('nama');
     $crud->required_fields('nama');
     $crud->unset_read();
     // caption of each columns
     $crud->display_as('nama', 'File Video');
     $crud->callback_after_delete(array($this, 'after_delete'));
     $crud->callback_column('nama', array($this, 'callback_column_nama'));
     $crud->callback_column('link', array($this, 'callback_column_link'));
     $crud->set_field_upload('nama', 'modules/blog/assets/uploads/video');
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     // render
     //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     $output = $crud->render();
     // prepare css & js, add them to config
     $config = array();
     $asset = new CMS_Asset();
     foreach ($output->css_files as $file) {
         $asset->add_css($file);
     }
     $config['css'] = $asset->compile_css();
     foreach ($output->js_files as $file) {
         $asset->add_js($file);
     }
     $config['js'] = $asset->compile_js();
     // show the view
     $this->view($this->cms_module_path() . '/manage_video_view', $output, $this->cms_complete_navigation_name('manage_video'), $config);
 }
开发者ID:kevinmel2000,项目名称:ci_webblog,代码行数:46,代码来源:manage_article.php


注:本文中的CMS_Asset::add_css方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。