|
|
Регистрация Восстановить пароль |
Повторная активизация e-mail |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
Опции темы | Поиск в этой теме |
25.07.2014, 18:17 | #1 |
Регистрация: 24.07.2014
Сообщений: 7
|
Использование twitter bootstrap в kohana
Есть приложение для добавление, удаления и изменения клиентов, проблема состоит в том что стили не работают на страницах добавления и изменения, на главной всё работает, как сделать так чтоб работали на всех страницах?
|
25.07.2014, 18:42 | #2 |
Старожил
Регистрация: 25.02.2007
Сообщений: 4,158
|
Скорее всего дело в путях.. Смотрите их
|
25.07.2014, 18:52 | #3 |
Регистрация: 24.07.2014
Сообщений: 7
|
да смотрел и вроде всё нормально...
|
25.07.2014, 19:19 | #4 |
Регистрация: 24.07.2014
Сообщений: 7
|
в основном шаблоне всё прописано, глобальные переменные из шаблон на эти страницы передаются а вот стили почему-то нет...и вроде всё правильно прописал....
|
25.07.2014, 19:31 | #5 |
Регистрация: 24.07.2014
Сообщений: 7
|
листинг контролера:
<?php defined('SYSPATH') or die('No direct script access.'); abstract class Controller_Common extends Controller_Template { public $template = 'main'; public function before() { parent::before(); View::set_global('title', 'Приложение для работы с клиентами'); View::set_global('description', 'Добавление, удаление, измeнение'); $this->template->styles = 'public/bootstrap/css/bootstrap.css'; $this->template->scripts = 'public/bootstrap/js/bootstrap.js'; $this->template->content = ''; } } листинг main: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo $title; ?></title> <meta name="description" content="<?php echo $description; ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link href="public/bootstrap/css/bootstrap.css" type="text/css" rel="stylesheet" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script type="text/javascript" src="public/bootstrap/js/bootstrap.js"></script> </head> <body> <div class="container"> <?php echo $content; ?> </div> </body> </body> </html> листинг контролера page: // Определяем шаблон по умолчанию public $template = 'main'; public function action_index() { $clients= array(); $content = View::factory('/pages/show') ->bind('clients', $clients); $client = new Model_Clients(); $clients = $client->get_all(); $this->template->content = $content; //model } public function action_add() { $clients= array(); $content = View::factory('/pages/add') ->bind('clients', $clients); $this->template->title = 'Добавить клиента'; $this->template->description = 'Страница добавления'; $this->template->styles = 'public/bootstrap/css/bootstrap.css'; $this->template->scripts = 'public/bootstrap/js/bootstrap.js'; $this->template->content = $content; if ($_POST) { $_POST = Arr::map('trim', $_POST); $post = Validation::factory($_POST); $post -> rule('name', 'not_empty') -> rule('name', 'min_length', array(':value', 4)) -> rule('email', 'email') -> rule('surname', 'not_empty') -> rule('surname', 'min_length', array(':value', 4)) -> rule('clients_id', 'not_empty') -> rule('clients_id', 'digit') -> rule('country', 'not_empty') -> rule('city', 'not_empty') -> rule('address', 'not_empty'); if($post -> check()) { $_POST=array( 'name' => $_POST['name'], 'email' => $_POST['email'], 'surname' => $_POST['surname'], 'clients_id' => $_POST['clients_id'], 'country' => $_POST['country'], 'city' => $_POST['city'], 'address' => $_POST['address'], ); ORM::factory('client') ->values($_POST) ->save(); Controller::redirect(''); } else $content->errors = $post->errors('validation'); } } Может кто подскажет что-то, может это я не вижу.... |
25.07.2014, 19:46 | #6 |
Регистрация: 24.07.2014
Сообщений: 7
|
всё проблема решена
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Переопределение в twitter bootstrap свойств? | Serik410 | HTML и CSS | 1 | 04.09.2014 09:18 |
API Twitter, сообщение в Twitter из PHP с картинкой | bpystep | Помощь студентам | 1 | 26.01.2014 17:30 |
Не могу выровнять инпуты (twitter bootstrap + own style) | whatever1 | HTML и CSS | 6 | 26.10.2012 22:06 |
follow redirect в Kohana Request | Anoobis | PHP | 0 | 17.04.2012 16:52 |
ORM валидация в Kohana | Anoobis | PHP | 2 | 10.06.2011 15:12 |