[MRM-1737] Improve welcome page

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1428116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-01-03 00:03:43 +00:00
parent 36563f58bd
commit 2d4c244727
3 changed files with 39 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -97,7 +97,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
url: 'restServices/redbackServices/loginService/logout',
complete: function(){
// go to welcome on logout
window.sammyArchivaApplication.setLocation("#search");
window.sammyArchivaApplication.setLocation("#welcome");
}
});
@ -688,8 +688,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
});
this.get('#welcome', function () {
$.log("#welcome hash");
checkCreateAdminLink(function(){window.sammyArchivaApplication.setLocation("#search")});
displayWelcome();
});
@ -740,6 +739,15 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
});
};
displayWelcome=function(){
$.log("#welcome hash");
checkCreateAdminLink(function(){
//window.sammyArchivaApplication.setLocation("#search")
$("#main-content" ).html($("#welcome" ).tmpl({runtimeInfo: window.archivaRuntimeInfo}));
drawQuickSearchAutocomplete("#quick-search-autocomplete-welcome");
});
}
userLoggedCallbackFn=function(user){
$.log("userLoggedCallbackFn:"+ (user?user.username():null));
var loginLink=$("#login-link");
@ -840,9 +848,9 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
};
drawQuickSearchAutocomplete=function(){
drawQuickSearchAutocomplete=function(selector){
$( "#quick-search-autocomplete" ).autocomplete({
$( selector ? selector : "#quick-search-autocomplete" ).autocomplete({
minLength: 3,
delay: 600,
source: function(request, response){

View File

@ -65,3 +65,29 @@
</div>
</script>
<script id="welcome" type="text/html">
<div class="row-fluid">
<div class="row">
<img src="images/archiva.png"/>
</div>
<div class="page-header">
<h3>${$.i18n.prop('welcome.title')}</h3>
</div>
<div class="row">
<h5>Type in the name of a project, or artifact into the text box below. Use "Search" on the left for more options.</h5>
<span class="span2"></span>
<div class="ui-widget">
<input type="text" class="ui-autocomplete-input search-query" id="quick-search-autocomplete-welcome"
placeholder="${$.i18n.prop('menu.topbar.quicksearch')}"/>
</div>
</div>
<br/>
<div class="row">
<span class="span1"></span>
<span class="span3"><a href="http://archiva.apache.org/docs/${runtimeInfo.version}" target="_blank">Documentation reference</a></span>
<span class="span1"></span>
<span class="span3"><a href="http://archiva.apache.org" target="_blank">Web site</a></span>
</div>
</div>
</script>