Example #1
0
 public function output()
 {
     $partial = new \PartialView($this->view, $this->model, $this->title);
     $partial->render();
 }
Example #2
0
    <!--[if lte IE 8]>
    <link rel="stylesheet" type="text/css" href="/css/img-notes-lteIE8.css" />
    <![endif]-->    
    <style>
        <?php 
echo $head_style;
?>
    </style>
</head>
<body>
    <div class="wrapper">    
        <div class="navbar-wrapper">        
            <?php 
echo PartialView::factory("share/_partials/Menu", NULL, false);
?>
        </div>                     
        <?php 
echo $content;
?>
        
        <?php 
echo PartialView::factory("share/_partials/Footer", NULL, false);
?>
    </div>    
    <script src="/js/jquery-1.10.2.min.js"></script>   
    <script src="/js/jquery-ui.min.js"></script> 
    <script src="/js/jquery-notes_1.0.8_min.js"></script>    
    <script src="/js/bootstrap.min.js"></script>    
    <script src="/js/workhaven-share-init.js"></script>  
</body>
</html>
Example #3
0
 /**
  * @returns string Rendered HTML.
  * @throws \Exception If the template file doesn't exist.
  */
 public function render()
 {
     $this->onRender();
     if (!is_file($this->settings->templatePath . $this->template)) {
         throw new \Exception("Template file '{$this->template}' don't exists");
     }
     $template = file_get_contents($this->settings->templatePath . $this->template);
     $partial = new PartialView($this);
     return $partial->renderPartial($template);
 }
Example #4
0
 public function addPartialView(PartialView $partial_view)
 {
     $this->partial_views[$partial_view->getName()] = $partial_view;
 }
Example #5
0
 private function renderBlockDirective($template)
 {
     $matched = preg_match(self::BLOCK_DIRECTIVE_REGEX . 's', $template, $match);
     if ($matched) {
         $name = $match[2];
         $arguments = $this->extractArguments($match[3]);
         $body = $match[4];
         $partial = new PartialView($this);
         $rendered = $partial->renderPartial($this->settings->blockDirectives[$name]->render($partial, $arguments, $body));
         $template = preg_replace('/' . preg_quote($match[0], '/') . '/', $rendered, $template, 1);
         return $template;
     }
     return null;
 }
Example #6
0
      <div class="navbar-wrapper">        
        <?php 
echo PartialView::factory("admin/_partials/Menu", NULL, TRUE);
?>
         
      </div>             
      <?php 
echo $content;
?>
          
      <?php 
echo PartialView::factory("admin/_partials/Footer", NULL, TRUE);
?>
    </div>
    <?php 
echo PartialView::factory("admin/_partials/Hidden", NULL, TRUE);
?>
        
    <script src="/js/jquery-1.10.2.min.js"></script>
    <script src="/js/jquery-ui.min.js"></script> 
    <script src="/js/jquery-notes_1.0.8_min.js"></script>     
    <script src="/js/bootstrap.min.js"></script>      
    <script src="/js/jquery.minicolors.min.js"></script>
    <script src="/js/jquery.workhaven-modal.js"></script>
    <script src="/js/jquery.textarea-autosize.min.js"></script>
    <script src="/js/bootstrap-datetimepicker.min.js"></script> 
    <script src="/js/bootbox.min.js"></script>    
    <script src="/js/bootstrap-select.min.js"></script>           
    <script src="/js/workhaven-init.js"></script>      
</body>
</html>