<div class="contentWrapper" id="ruleEdit">

	<div class="pageTitle">
		<h1>
			<span>Create condition</span>
			<div class="btn-group no-btn pull-right">
                <a data-toggle="dropdown" class="btn no-btn dropdown-toggle option-menu right">
                </a>
                <ul class="dropdown-menu pull-right">
                    <li><a ng-href="/dashboard/alerts/listAll" ng-click="searchTerm='';searchWidgets(searchTerm)">View all alerts</a></li>
                    <li><a ng-href="/dashboard/alerts/listAll#conditions" ng-click="searchTerm='';searchWidgets(searchTerm)">View all conditions</a></li>
                    <li><a ng-href="/dashboard/eventlog">View event log</a></li>
                </ul>
        	</div>
        </h1>
	</div>

	<div><?php $this->load->view('/partials/_notification'); ?></div>

	<div ng-form="alertEdit">

	<?php // object-dependent views
	    $this->load->view('/partials/rules/editrule.php');
	?>
	</div>

	<div class="buttons">
		<button class="btn btn-large pull-left" onclick="unbindBeforeUnload();window.history.back();">Cancel</button>
		<button ng-click="saveRule();unbindBeforeUnload();" ng-disabled="!ruleForm.$valid" class="btn btn-large btn-primary pull-right">Save</button>
	</div>

</div>
