]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1737] Improve welcome page
authorOlivier Lamy <olamy@apache.org>
Thu, 3 Jan 2013 00:03:43 +0000 (00:03 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 3 Jan 2013 00:03:43 +0000 (00:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1428116 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva.png [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/generics.html

diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva.png b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva.png
new file mode 100644 (file)
index 0000000..6965e63
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/images/archiva.png differ
index 30c0c25b9e53040298122b22a04de0b5f129ead0..c0b65ba03fe4cff123d0415740908495942a64f8 100644 (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){
index 9fd3989c8d876106ebb3bf8368f2e2d01461561c..ff5fda32331dce3ca16dc0997b0abd124bcfe5a0 100644 (file)
   </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>
+