Пример #1
0
 /**
  * @return \Twig_Environment
  */
 public function setEnvironment()
 {
     $this->properties['twigLoader'] = new \Twig_Loader_Filesystem($this->view->views);
     $this->template = new \Twig_Environment($this->properties['twigLoader'], array('cache' => getcwd() . DS . APPPATH . DS . 'temp' . DS . 'twig' . DS . 'tmp' . DS . 'cache', 'auto_reload' => $this->properties['autoReload'], 'debug' => $this->properties['twigDebug']));
     $function = new \Twig_SimpleFunction('link', function ($link, $name = null, $attributes = array()) {
         return Asset::link(str_replace('.', '/', $link), $name, $attributes);
     });
     $this->template->addFunction($function);
     return $this->template;
 }
<?php

use Cygnite\AssetManager\Asset;
?>

<div class="pull-right">
    <?php 
echo Asset::link('product', 'Back', array('class' => 'btn btn-default btn-small btn-inverse'));
?>
</div>

<div class="error" style="color:#FF0000;">
    <?php 
echo $this->validation_errors;
?>
</div>

<div >
    <?php 
echo $this->form;
?>
</div>
Пример #3
0
</td>
			<td><?php 
        echo $row->created_at;
        ?>
</td>
			<td><?php 
        echo $row->updated_at;
        ?>
</td>


            <td>
                <?php 
        echo Asset::anchor('product/show/' . $row->id, 'View', ['class' => 'btn btn btn-info btn-xs']);
        echo Asset::anchor('product/edit/' . $row->id, 'Edit', ['class' => 'btn btn-default btn-xs']);
        echo Asset::anchor('product/delete/' . $row->id, 'Delete', ['class' => 'btn btn-danger btn-xs']);
        ?>

            </td>
        </tr>
    <?php 
        $i++;
    }
}
?>
    </tbody>

</table>

<nav > <?php 
//echo $links;
Пример #4
0
 private function setLink()
 {
     // We will set default function to twig engine
     $this->functions[] = $this->getTwigSimpleFunctionInstance('link', function ($link, $name = null, $attributes = array()) {
         return Asset::link(str_replace('.', '/', $link), $name, $attributes);
     });
     return $this;
 }
Пример #5
0
        $rowType = $i % 2 == 0 ? 'even' : 'odd';
        ?>
            <tr class='<?php 
        echo $rowType;
        ?>
'>
                <td> <?php 
        echo $i;
        ?>
</td>
                {#tdColumns#}
                <td>
                    <?php 
        echo Asset::link('#controllerName#/show/' . $value->id, 'View', array('class' => 'btn btn btn-info'));
        echo Asset::link('#controllerName#/type/' . $value->id, 'Edit', array('class' => 'btn btn btn-info'));
        echo Asset::link('#controllerName#/delete/' . $value->id, 'Delete', array('class' => 'btn btn-danger'));
        ?>

                </td>
            </tr>
            <?php 
        $i++;
    }
} else {
    echo '<tr> <td >No records found !</td></tr>';
}
?>
    </tbody>


</table>
Пример #6
0
                    <div class="footerrow" align="center" style="clear:both;padding-top: 0px;">
                        <div class="footer-hr"></div>

<?php 
echo \Cygnite\Foundation\Application::poweredBy();
?>
                    </div>
                </div>
                <div class="footer-inner-right"> </div>
                <div class="clear"> </div>
            </div>

            <!-- ================================================== -->
            <!-- Placed at the end of the document so the pages load faster -->
<?php 
echo Asset::script('assets/js/cygnite/jquery.js');
?>

<style type="text/css">

                    .feature-block{ float: left;border:0px; font-size: 17px;font-family: small-caption;}
                    .feature-block:hover{box-shadow:none;}
                    .ul-text { color:#61A5AA;height: 213px !important;}
                    .header { height: 131px; padding: 4px 0;}
                    .features {height: 284px;}
					.title {padding-top: 10px;}
                </style>
    </body>
</html>
    <hr class="featurette-divider">

    <div class="footer" >
        <div class="footer-inner-left"> </div>
        <div class="footer-inner" align="center">
            <div class="footerrow tweets"  >
                <p style="font-size: 16px;">If you are exploring Cygnite Framework for first time,
                    you should read beautiful <a href="http://www.cygniteframework.com/2013/07/quickstart.html">User Guide</a> </p>
                <p style="font-size: 18px;">You will love the simplicity of Cygnite Framework</p>
            </div>

            <div class="footerrow" align="center" style="clear:both;padding-top: 0px;">
                <div class="footer-hr"></div>

                <?php 
echo \Cygnite\Foundation\Application::poweredBy();
?>
            </div>
        </div>
        <div class="footer-inner-right"> </div>
        <div class="clear"> </div>
    </div>

<?php 
echo Asset::style('assets/css/cygnite/style.css');
?>

<style type="text/css">
    .feature-block{ float: left;border:0px; font-size: 17px;font-family: small-caption;}
    .title {padding-top: 10px;}
</style>
</td>
			<td><?php 
        echo $value->created_at;
        ?>
</td>
			<td><?php 
        echo $value->updated_at;
        ?>
</td>


            <td>
                <?php 
        echo Asset::link('product/show/' . $value->id, 'View', array('class' => 'btn btn btn-info btn-xs'));
        echo Asset::link('product/edit/' . $value->id, 'Edit', array('class' => 'btn btn-default btn-xs'));
        echo Asset::link('product/delete/' . $value->id, 'Delete', array('class' => 'btn btn-danger btn-xs'));
        ?>

            </td>
        </tr>
    <?php 
        $i++;
    }
} else {
    echo 'No records found !';
}
?>
    </tbody>

</table>
Пример #9
0
<?php

use Cygnite\AssetManager\Asset;
use Cygnite\Common\UrlManager\Url;
use Apps\Components\Wallscript\Time\TimeStamp;
use Apps\Models\FacebookPostsComments as FBComment;
echo Asset::script('assets/js/cygnite/jquery.js');
echo Asset::style('assets/css/fb_screen.css');
?>
<script type="text/javascript">
    var baseUrl = "<?php 
echo Url::getBase();
?>
";
</script>

<h3>Facebook Style Wall Posting Script using jQuery PHP and Ajax.</h3>

<br> <br>

<div align="">

            <div class="col-lg-8 col-md-4 col-sm-5" style="background:none repeat scroll 0 0 #EDEDED;">
                <div style="float:left"> <i class="glyphicon glyphicon-edit blue-color"></i>&nbsp;&nbsp;<label>Update Status </label> </div>
                <textarea class="form-control post-box" rows="3" id="post-share-box" name="post-share-box"  cols="60" placeholder="What's on your mind ?" ></textarea>


                <div class="" id="comment-bottom-container" style="background:#EDEEEF;paddin:10px 5px;">
                    &nbsp;
                    <!--<div class="comment-bottom-wrap"> <div class="btn-primary button comment"></div></div>-->
                    <span>PHP, Cygnite, JQuery, AJAX Programming + Tutorials ( <a href="http://www.appsntech.com" target="_blank" style="color:#EC092B">www.appsntech.com</a> ) </span>
Пример #10
0
 public function testStaticCallToAnchorTag()
 {
     $this->setUpAssetConfig();
     $anchor = Asset::anchor('user/add', 'Add User');
     $this->assertEquals('<a href="http://localhost/cygnite/user/add" type="static">Add User</a>', $anchor);
 }
Пример #11
0
<?php

use Cygnite\AssetManager\Asset;
?>
<div style="float:right;margin-right:47px; margin-bottom: 10px;margin-top: 10px;">
    <?php 
echo Asset::link('#controllerName#', 'Back', array('class' => 'btn btn btn-info'));
?>
</div>

<div class="error">
    <?php 
echo $this->validation_errors;
?>
</div>

<div style="float:left;">
    <?php 
echo $this->form;
?>
</div>
Пример #12
0
<?php

use Cygnite\AssetManager\Asset;
?>

<div class="pull-right">
    <?php 
echo Asset::anchor('product', 'Back', ['class' => 'btn btn-default btn-small btn-inverse']);
?>
</div>

<div class="error">
        <?php 
if (!empty($validation_errors)) {
    /*
    | Display all validation error messages here
    */
    foreach ($validation_errors as $key => $message) {
        ?>

                <p style="color:#FF0000;"> <?php 
        echo $message;
        ?>
 </p>
        <?php 
    }
}
?>
</div>

<div >
Пример #13
0
    <div class="footer-inner-left"> </div>
    <div class="footer-inner" align="center">
        <div class="footerrow tweets"  >
            <p style="font-size: 16px;">If you are exploring Cygnite Framework for first time,
                you should read beautiful <a href="http://www.cygniteframework.com/2013/07/quickstart.html">User Guide</a> </p>
            <p style="font-size: 18px;">You will love the simplicity of Cygnite Framework</p>

        </div>

        <div class="footerrow" align="center" style="clear:both;padding-top: 0px;">
            <div class="footer-hr"></div>

            <?php 
echo \Cygnite\Foundation\Application::poweredBy();
?>
        </div>
    </div>
    <div class="footer-inner-right">

    </div>
    <div class="clear"> </div>
</div>

<?php 
echo Asset::css('public/assets/css/cygnite/style.css');
?>

<style type="text/css">
    .feature-block{ float: left;border:0px; font-size: 17px;font-family: small-caption;}
    .title {padding-top: 10px;}
</style>