2013-07-20 17:41:56 -05:00
|
|
|
<a href="#title" accesskey="2"></a>
|
|
|
|
<ul id="main-menu">
|
|
|
|
{if !$user.isAnonymous()}
|
|
|
|
{aurl 'url', 'idf_dashboard'}
|
|
|
|
<li>{blocktrans}Welcome, <strong><a class="userw" href="{$url}">{$user}</a></strong>.{/blocktrans}
|
2013-07-30 19:15:42 -05:00
|
|
|
<a href="{url 'IDF_Views::logout'}">{trans 'Sign Out'}</a></li>
|
|
|
|
<li><a href="{url 'IDF_Views_User::requestproject'}">Request Project</a></li>
|
|
|
|
{else}
|
2013-07-20 17:41:56 -05:00
|
|
|
<a href="{url 'IDF_Views::login'}">{trans 'Sign in or create your account'}</a></li>
|
|
|
|
{/if}{if $customForgePageEnabled}
|
|
|
|
<li><a href="{url 'IDF_Views::index'}">{trans 'Home'}</a></li>
|
|
|
|
{/if}<li id="project-list"><a href="{url 'IDF_Views::listProjects'}">{trans 'Project List'} ▾</a>
|
|
|
|
{if $allProjects.count() != 0}
|
2014-12-19 22:47:32 -06:00
|
|
|
|
|
|
|
<ul class="prjlistclass">
|
|
|
|
<li id="searchkeep"><input size="15" type="text" id="prjname" name="prjname" value="Project Name..." /></li>
|
|
|
|
{foreach $allProjects as $p}
|
|
|
|
<li class="projectitem"><a href="{url 'IDF_Views_Project::home', array($p.shortname)}"><img class="logo" src="{url 'IDF_Views_Project::logo', array($p.shortname)}" alt="{trans 'Project logo'}" />{if $p.private}<img class="lock" src="{media '/idf/img/lock.png'}" alt="{trans 'Private project'}" />{/if}{$p}</a></li>
|
2013-07-20 17:41:56 -05:00
|
|
|
{/foreach}</ul>
|
|
|
|
{/if}</li>{if $isAdmin}<li><a href="{url 'IDF_Views_Admin::forge'}">{trans 'Forge Management'}</a></li>{/if}<li>
|
|
|
|
<a href="{url 'IDF_Views::faq'}" title="{trans 'Help and accessibility features'}">{trans 'Help'}</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{if $allProjects.count() != 0}
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
{literal}
|
|
|
|
$(document).ready(function() {
|
2014-12-19 22:47:32 -06:00
|
|
|
|
|
|
|
$("#prjname").on("click", function() {
|
|
|
|
if ($("#prjname").val() == "Project Name...")
|
|
|
|
$("#prjname").val("");
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#prjname").keydown(function(ev) {
|
|
|
|
if(ev.which === 13) {
|
|
|
|
var elements = $('.projectitem :visible');
|
|
|
|
var count = elements.size();
|
|
|
|
if (count > 0 && (count / 2) == 1)
|
|
|
|
{
|
|
|
|
window.location.replace($('.projectitem :visible').attr("href"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#prjname').keyup(function(){
|
|
|
|
var valThis = $(this).val().toLowerCase();
|
|
|
|
if(valThis == ""){
|
|
|
|
$('.prjlistclass > li').show();
|
|
|
|
} else {
|
|
|
|
$('.prjlistclass > li').each(function(){
|
|
|
|
if ($(this).attr('id') && $(this).attr('id') == "searchkeep")
|
|
|
|
return true;
|
|
|
|
var text = $(this).text().toLowerCase();
|
|
|
|
(text.indexOf(valThis) >= 0) ? $(this).show() : $(this).hide();
|
|
|
|
});
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2013-07-20 17:41:56 -05:00
|
|
|
$('#project-list').bind('mouseenter', function(ev) {
|
|
|
|
$(this).find('ul').show();
|
|
|
|
}).bind('mouseleave', function(ev) {
|
|
|
|
$(this).find('ul').hide();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
{/literal}
|
|
|
|
</script>
|
|
|
|
{/if}
|
|
|
|
|