<div class="navbar navbar-inverse navbar-fixed-top">

	<div class="navbar-inner">

		<div class="container-fluid">

			{{#unless guest}}
			<a class="brand" href="#"></a>
			{{/unless}}

			{{#if bookmarks}}

			<ul class="nav dropdown">
				<li>
					<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{t "My Bookmarks"}} <b
					class="caret"></b></a>
					<ul id="dropdown-bookmarks" class="dropdown-menu" role="menu" aria-labelledby="dLabel">

						{{#bookmarks}}
						<li class="dropdown-submenu">
							<a tabindex="-1" href="#">{{this}}</a>
							<ul class="dropdown-menu">
								<li>
									<a tabindex="-1" href="#">{{t "View"}}</a>
								</li>
								<li>
									<a tabindex="-1" href="#">{{t "Copy to workspace"}}</a>
								</li>
								<li>
									<a tabindex="-1" href="#">{{t "Edit"}}</a>
								</li>
							</ul>
						</li>

						{{/bookmarks}}

					</ul>

				</li>

			</ul>

			{{/if}}

			<ul class="nav pull-right">

				<li class="nav-separator">
					<a href="/store?user={{user.username}}" target="_blank"><i class="icon-shopping-cart"></i> {{t "Store"}}</a>

				</li>

				{{#if guest}}

				{{#if sso}}
				<li>
					<a href="#" id="sso-login">{{t "Sign in"}}</a>
					<form id="sso-login-form" method="post" action="{{ssoIdpURL}}" style="display: none;">
						<input type="hidden" name="SAMLRequest" value="{{ssoEncodedRequest}}"/>
						<input type="hidden" name="RelayState" value="{{ssoRelayState}}"/>
						<input type="hidden" name="SSOAuthSessionID" value="{{ssoSessionId}}"/>
					</form>
				</li>
				<li>
					<a href="{{url "/login.jag"}}" id="btn-register" class="btn btn-primary">{{t "Register"}}</a>
				</li>
				{{else}}
				<li>
					<a href="#" data-toggle="modal" data-target="#modal-login" >{{t "Sign in"}}</a>
				</li>
				<li>
					<a id="btn-register" class="btn btn-primary"  data-toggle="modal" data-target="#modal-register">{{t "Register"}}</a>
				</li>
				{{/if}}

				{{else}}
				<li>

					<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-user"></i> {{user.username}} <b class="caret"></b></a>
					<ul class="dropdown-menu dropdown-account" role="menu" aria-labelledby="dLabel">
						<li>

							{{#if sso}}
							<a href="{{url "/logout.jag"}}"><i class="icon-signout"></i> {{t "Sign out"}}</a>
							{{else}}
							<a id="btn-signout"><i class="icon-signout"></i> {{t "Sign out"}}</a>
							{{/if}}

						</li>

					</ul>

				</li>
				{{/if}}
			</ul>

			<!--/.nav-collapse -->
		</div>
	</div>
	{{#if designer}}
	<div class="navbar-inner sub-navbar-designer">

		<div class="container-fluid">

			<div class="row-fluid">

				<div class="span5">
					<input id="inp-designer-title" type="text" value="{{dashboard}}">
				</div>
				<div class="span7">

					<ul class="nav pull-right">

						<li class="dropdown">
							<a href="#" data-toggle="dropdown" class="dropdown-toggle"><i class="icon-plus"></i> Add Block <b class="caret"></b></a>
							<ul class="dropdown-menu dropdown-share">
								<form>
									<li>
										<h4>Define gadget size in grid</h4>

									</li>
									<li>

										<div id="dummy-gadget-wrapper">
											<div id="dummy-gadget-container" class="ui-widget-content">
												<div id="dummy-gadget"  class="ui-widget-content">
													<div id="dummy-size">
														1x1
													</div>
												</div>
											</div>
										</div>
									</li>

									<li>
										<button id="btn-add-dummy-gadget" class="btn btn-primary">
											Add Empty Block
										</button>
									</li>
								</form>
							</ul>

						</li>

						<li id="btn-save">
							<a href="#"><i class="icon-save"></i> Save</a>
						</li>

						<li>
							<a id="btn-preview-dash" href="#" data-toggle="tooltip" title="Please Save first" class="disabled"><i class="icon-eye-open"></i> View</a>
						</li>

					</ul>

				</div>
			</div>

			<!--/.nav-collapse -->
		</div>
	</div>

	<div class="navbar-inner sub-navbar-designer-view">

		<div class="container-fluid">

			<div class="row-fluid">

				<div class="span5">

				</div>
				<div class="span7">
					<ul class="nav pull-right">
						<li>
							<a href="#" id="btn-exit-view" data-toggle="dropdown" class="dropdown-toggle float-left-link"><i class="icon-magic"></i> Personalize</a>
						</li>
					</ul>
				</div>
			</div>

			<!--/.nav-collapse -->
		</div>
	</div>

	{{/if}}
</div>
{{>login}}
{{>register}}

