Files
netdisco/Netdisco/views/index.tt
2012-01-06 22:15:23 +00:00

90 lines
3.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[%
more_dd = { "Reports" = "/reports" }
user_dd = [
{ "title" = "Settings", "link" = "/settings" },
{ "title" = "Help", "link" = "/help" },
{ "title" = "Log Out", "link" = "/logout" }
]
%]
<div class="topbar" data-dropdown="dropdown">
<div class="topbar-inner">
<div class="container-fluid">
<a class="brand" href="/">Netdisco</a>
[% IF session.user %]
<ul class="nav">
<li><a href="/">Home</a></li>
[% IF more_dd.size %]
<li class="dropdown">
<a href="#" class="dropdown-toggle">More</a>
<ul class="dropdown-menu">
[% FOREACH title IN more_dd.keys.sort %]
<li><a href="[% more_dd.$title %]">[% title %]</a></li>
[% END %]
</ul>
</li> <!-- /dropdown -->
[% END %]
</ul>
<form action="/search">
<input class="span5" type="text" placeholder="Search">
</form>
<ul class="nav secondary-nav">
<li class="menu">
<p>Logged in as &nbsp;</p>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle">[% session.user %]</a>
<ul class="dropdown-menu">
[% FOREACH item IN user_dd %]
<li><a href="[% item.link %]">[% item.title %]</a></li>
[% END %]
</ul>
</li> <!-- /dropdown -->
</ul>
[% END %]
</div>
</div>
</div>
<div class="container">
<div class="row nd_herorow">
<div class="span10 offset3">
[% IF params.failed %]
<div class="nd_loginalert alert-message error" data-alert="on">
<a class="close" href="#">×</a>
<p>Incorrect username or password, please try again.</p>
</div>
[% END %]
[% IF params.logout %]
<div class="nd_loginalert alert-message notice" data-alert="on">
<a class="close" href="#">×</a>
<p>You are logged out.</p>
</div>
[% END %]
[% IF params.notfound %]
<div class="nd_loginalert alert-message notice" data-alert="on">
<a class="close" href="#">×</a>
<p>Sorry, page not found.
<a href="http://sourceforge.net/tracker/?group_id=80033&atid=558508" target="_blank">Report a Bug?</a></p>
</div>
[% END %]
<div class="hero-unit">
<h2>Welcome to Netdisco</h2>
<small>Netdisco is an Open Source web-based network management tool.</small>
[% IF NOT session.user %]
<form class="nd_loginform" method="post" action="/login">
<div class="inline-inputs">
<input placeholder="Username" class="span2" name="username" type="text"/>
<input placeholder="Password" class="span2" name="password" type="password"/>
<button type="submit" class="btn info">Log In</button>
</div>
[% IF vars.requested_path %]
<input type="hidden" name="path" value="[% vars.requested_path %]"/>
[% END %]
</form>
[% END %]
</div>
</div>
</div>
</div> <!-- /container -->