Opening changes
authorYasin <mohammed-yasin.rahman@lip6.fr>
Mon, 30 Jun 2014 14:56:24 +0000 (16:56 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Mon, 30 Jun 2014 14:56:24 +0000 (16:56 +0200)
portal/registrationview.py
portal/templates/base.html
portal/templates/onelab/onelab_home-view.html
portal/templates/onelab/onelab_widget-topmenu.html

index 13b6961..46c64b1 100644 (file)
@@ -50,6 +50,7 @@ class RegistrationView (FreeAccessView, ThemeView):
         page.add_css_files ( [ "https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" ] )
 
         if method == 'POST':
+            reg_form = {}
             # The form has been submitted
             
             # get the domain url
@@ -152,6 +153,12 @@ class RegistrationView (FreeAccessView, ThemeView):
 
         else:
             user_request = {}
+            ## this is coming from onelab website onelab.eu
+            reg_form = {
+                'first_name':  wsgi_request.GET.get('first_name', ''),
+                'last_name': wsgi_request.GET.get('last_name', ''),
+                'email': wsgi_request.GET.get('email', ''),
+                }
 
         template_env = {
           'topmenu_items': topmenu_items_live('Register', page),
@@ -160,5 +167,6 @@ class RegistrationView (FreeAccessView, ThemeView):
           'theme': self.theme
           }
         template_env.update(user_request)
+        template_env.update(reg_form)
         template_env.update(page.prelude_env ())
         return render(wsgi_request, self.template,template_env)
index de62043..5989508 100644 (file)
@@ -8,6 +8,7 @@
 {% include 'messages-transient-header.html' %}
 <script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
 <script src="{{ STATIC_URL }}js/jquery.dataTables.min.js"></script>
+<script src="{{ STATIC_URL }}js/jquery.qtip.min.js"></script>
 <script src="{{ STATIC_URL }}js/bootstrap.datatables.js"></script>
 <!-- <script src="{{ STATIC_URL }}js/stash.min.js"></script> -->
 <script src="{{ STATIC_URL }}js/myslice.js"></script>
@@ -31,6 +32,8 @@
 {% insert_str prelude "css/topmenu.css" %}
 {% insert_str prelude "js/logout.js" %}
 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ theme }}.css">
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/jquery.qtip.min.css">
+
 
 <script type="text/javascript">
 /*
@@ -49,7 +52,8 @@ $(document).ready(function() {
             if(data.length > 0){
                 drawSlices(data[0].slices);  
             }else{
-               $("div#home-slice-list").html("<div>no slice</div>");
+               $("div#home-slice-list").html(
+                                       "<div>You do not yet have a slice</div>");
                        $("ul#dropdown-slice-list").append("<li>no slice</li>");
                 slices.push("no slice");
             }
@@ -60,6 +64,7 @@ $(document).ready(function() {
     }
     function drawSlices(slices){
         var items = [];
+               
         $.each( slices, function(i, val) {
             items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
         });
@@ -67,6 +72,7 @@ $(document).ready(function() {
         $("ul#dropdown-slice-list").append(items.join( "" ));
     }
     {% endif %}
+       jQuery('[title!=""]').qtip();
 });
 </script>
 </head>
index 15038ca..87f3b14 100644 (file)
                        <div>
                                <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
                        </div>
+                       <div>
+                       <p title="A slice is a set of testbed resources on which you can conduct an experiment. 
+                       Either ask your colleagues to give you access to an existing slice or request a new slice now.">
+                       <strong>Your slices</strong></p>
+                       </div>
                        <div>   
                                <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
                        </div>
@@ -59,7 +64,7 @@
                                {% if person.last_name %}
                                        {{person.first_name}} {{person.last_name}}<br />
                                {% endif %}
-                       <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
+                       <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
                </div>
                </div>
        </div>
index c0dbad3..5a6a19b 100644 (file)
@@ -21,8 +21,8 @@
                                </li>
                                {%if 'is_pi'  in pi %}  
                                <li id="nav-institution" class=""><a href="/portal/institution">MANAGEMENT</a></li>
-                               {%endif%}
                                <li id="nav-request"><a href="/portal/validate">REQUESTS</a></li>
+                                {%endif%}
                                <li><a href="/portal/support/">SUPPORT</a></li>