示例#1
0
 public function render(Application $app, $replaces = array())
 {
     $uri = $this->uri;
     if (count($replaces) > 0) {
         $uri = str_replace(array_keys($replaces), array_values($replaces), $this->uri);
     }
     $attributes = $this->attributes;
     if (!isset($attributes['class'])) {
         $attributes['class'] = "";
     }
     $attributes['class'] .= " btn btn-{$this->btn_size} btn-{$this->btn_type} btn-label-left";
     return $app->html->anchor($uri, Icons::show($this->icon) . " " . $app->lang->get_ucf($this->name), $attributes) . " ";
 }
示例#2
0
<?php

use Door\Bootstrap\Helper\Icons;
$h = $app->html;
array_shift($admin_menu);
?>
<h1>Панель управления</h1>
<br/><br/>
<div class="container main-page-links">
                    <div class="row">
                        <div class="col-md-12 text-center">
							<?php 
foreach ($admin_menu as $item) {
    ?>
								<?php 
    echo $h->anchor($item->uri, Icons::show($item->icon) . "<br/>{$item->name}", array('class' => 'btn btn-primary btn-lg'));
    ?>
							<?php 
}
?>
							
                        </div>
                    </div>
</div>
示例#3
0
<?php 
}
if (isset($success)) {
    ?>
<p class="bg-success"><?php 
    echo $l->get_ucf("saved");
    ?>
</p>
<?php 
}
?>
<div class="box">
	<div class="box-content">
		<form role="form" class="form-horizontal" method="POST" action="">		
			<?php 
echo $fields;
?>
			<div class="clearfix"></div>
			<div class="text-right">
				<button class="btn btn-primary btn-label-left" type="submit">
					<?php 
echo Icons::fa('save');
?>
					<?php 
echo $l->get_ucf("save");
?>
				</button>
			</div>
		</form>
	</div>	
</div>
示例#4
0
        }
    }
}
?>
					<?php 
foreach ($admin_menu as $item) {
    ?>
					<?php 
    $class = "";
    if ($item->uri == $active_uri) {
        $class = "active";
    }
    ?>
					 <li>
						<?php 
    echo $h->anchor($item->uri, Icons::show($item->icon) . " <span class='hidden-xs'>{$item->name}</span>", array('class' => $class));
    ?>
					 </li>					
					<?php 
}
?>
													
				</ul>
				
				<div class="powered">Powered by <a href='https://github.com/doorframework'>Door Framework</a></div>
			</div>
			<!--Start Content-->
			<div id="content" class="col-xs-12 col-sm-10">
				<?php 
echo $content;
?>
示例#5
0
        echo \Door\Bootstrap\Helper\Icons::fa('bars');
        ?>
</td>
				<?php 
    }
    ?>
				
				<?php 
    $fields = $model->get_fields();
    foreach ($columns as $column) {
        if ($column instanceof \Door\BSPanel\Data\IColumn) {
            echo "<td>" . $column->render($item) . "</td>";
        } else {
            $val = $item->{$column};
            if ($fields[$column]['type'] == 'boolean') {
                $val = Icons::show($val ? "ok" : "remove");
            }
            if ($fields[$column]['type'] == 'date') {
                $val = date('d.m.Y', $val);
            }
            echo "<td>{$val}</td>";
        }
    }
    ?>
                <td class="text-right">
					<?php 
    foreach ($buttons as $button) {
        echo $button->render($app, array("<id>" => $item->pk()));
    }
    ?>