From: Ciro Scognamiglio Date: Tue, 5 Aug 2014 15:38:17 +0000 (+0200) Subject: many cosmetic changes X-Git-Tag: myslice-1.0~29^2~1 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=cb3a40dfdc1c79ca57458d1c18732334d58734fd many cosmetic changes --- diff --git a/auth/views.py b/auth/views.py index 104d11c9..b959e730 100644 --- a/auth/views.py +++ b/auth/views.py @@ -1,12 +1,18 @@ from django.contrib.auth import logout from django.http import HttpResponseRedirect +import activity.user + # hard question : where should we redirect requests to logout if user is not logged in ? def logout_user (request): # check that we're indeed logged in if not request.user.is_authenticated(): return HttpResponseRedirect ('/') print "LOGGING OUT" + + # log user activity + activity.user.logout(request) + logout(request) return HttpResponseRedirect ('/') diff --git a/myslice/theme.py b/myslice/theme.py index d44b854e..e16326b0 100644 --- a/myslice/theme.py +++ b/myslice/theme.py @@ -14,12 +14,12 @@ class ThemeView (object): def template(self): # Load a template from the theme directory if it exists # else load it from the common templates dir - print "THEME = ",self.theme - print "TEMPLATE = ",self.template_name - print "TEMPLATE_DIRS = ",TEMPLATE_DIRS + #print "THEME = ",self.theme + #print "TEMPLATE = ",self.template_name + #print "TEMPLATE_DIRS = ",TEMPLATE_DIRS filename = self.theme + '_' + self.template_name - print any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) - print (os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) + #print any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) + #print (os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS) if any(os.path.exists(os.path.join(d,filename)) for d in TEMPLATE_DIRS): return filename else: diff --git a/plugins/apply/templates/apply.html b/plugins/apply/templates/apply.html index ab52efcc..f05af49d 100644 --- a/plugins/apply/templates/apply.html +++ b/plugins/apply/templates/apply.html @@ -42,6 +42,6 @@ - + diff --git a/plugins/querytable/templates/querytable.html b/plugins/querytable/templates/querytable.html index c843926f..8da79d4a 100644 --- a/plugins/querytable/templates/querytable.html +++ b/plugins/querytable/templates/querytable.html @@ -2,7 +2,7 @@ - {% if checkboxes %}{% endif %} + {% if checkboxes %}{% endif %} {% for column, field in columns.items %} {% endfor %} {% for column, field in hidden_columns.items %} {% endfor %} diff --git a/plugins/scheduler2/static/js/scheduler2.js b/plugins/scheduler2/static/js/scheduler2.js index 04665c66..6b55b92a 100755 --- a/plugins/scheduler2/static/js/scheduler2.js +++ b/plugins/scheduler2/static/js/scheduler2.js @@ -815,6 +815,7 @@ var SCHEDULER_COLWIDTH = 50; var num_hidden_cells; $("#DateToRes").datepicker({ + dateFormat: "D, d M yy", onRender: function(date) { return date.valueOf() < now.valueOf() ? 'disabled' : ''; } diff --git a/plugins/scheduler2/templates/scheduler.html b/plugins/scheduler2/templates/scheduler.html index 7c298773..928b2da7 100755 --- a/plugins/scheduler2/templates/scheduler.html +++ b/plugins/scheduler2/templates/scheduler.html @@ -8,22 +8,28 @@
-
- -
-
- -
-
-
-
- - - +
+
+
+ +
+
+ + + +
+
-
-
-
+
+
+
+ +
+
+
+
+
+
diff --git a/portal/homeview.py b/portal/homeview.py index b4faa8e2..f830cc16 100644 --- a/portal/homeview.py +++ b/portal/homeview.py @@ -5,6 +5,7 @@ from django.contrib.auth import authenticate, login, logout from django.template import RequestContext from django.shortcuts import render_to_response from django.shortcuts import render + import json from unfold.loginrequired import FreeAccessView @@ -18,6 +19,8 @@ from myslice.configengine import ConfigEngine from myslice.theme import ThemeView +import activity.user + class HomeView (FreeAccessView, ThemeView): template_name = 'home-view.html' @@ -62,6 +65,9 @@ class HomeView (FreeAccessView, ThemeView): env['person'] = self.request.user env['username'] = self.request.user + # log user activity + activity.user.login(self.request) + ## check user is pi or not platform_query = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled') account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config') diff --git a/portal/managementtababout.py b/portal/managementtababout.py index 899fbfdf..cee93118 100644 --- a/portal/managementtababout.py +++ b/portal/managementtababout.py @@ -16,15 +16,11 @@ from myslice.configengine import ConfigEngine from myslice.theme import ThemeView import json -import activity - class ManagementAboutView (FreeAccessView, ThemeView): template_name = 'management-tab-about.html' def get (self, request): - activity.userLogin(request) - if request.user.is_authenticated(): user_query = Query().get('user').select('user_hrn','parent_authority').filter_by('user_hrn','==','$user_hrn') user_details = execute_query(self.request, user_query) diff --git a/portal/registrationview.py b/portal/registrationview.py index e0a1ddf3..c24fda68 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -5,6 +5,7 @@ from hashlib import md5 from django.views.generic import View from django.template.loader import render_to_string + from django.shortcuts import render from django.contrib.auth import get_user_model from django.contrib.sites.models import Site @@ -21,6 +22,8 @@ from portal.actions import create_pending_user from myslice.theme import ThemeView +import activity.user + # since we inherit from FreeAccessView we cannot redefine 'dispatch' # so let's override 'get' and 'post' instead # @@ -43,12 +46,13 @@ class RegistrationView (FreeAccessView, ThemeView): if authorities is not None: authorities = sorted(authorities) + print "############ BREAKPOINT 1 #################" # Page rendering page = Page(wsgi_request) page.add_js_files ( [ "js/jquery.validate.js", "js/my_account.register.js", "js/jquery.qtip.min.js","js/jquery-ui.js" ] ) page.add_css_files ( [ "css/onelab.css", "css/registration.css", "css/jquery.qtip.min.css" ] ) page.add_css_files ( [ "https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" ] ) - + print "############ BREAKPOINT 2 #################" if method == 'POST': reg_form = {} # The form has been submitted @@ -56,7 +60,9 @@ class RegistrationView (FreeAccessView, ThemeView): # get the domain url current_site = Site.objects.get_current() current_site = current_site.domain - + + print "############ BREAKPOINT 3 #################" + for authority in authorities: if authority['name'] == wsgi_request.POST.get('org_name', ''): authority_hrn = authority['authority_hrn'] @@ -64,7 +70,9 @@ class RegistrationView (FreeAccessView, ThemeView): # Handle the case when the template uses only hrn and not name if authority_hrn is None: authority_hrn = wsgi_request.POST.get('org_name', '') - + + print "############ BREAKPOINT 4 #################" + post_email = wsgi_request.POST.get('email','').lower() salt = randint(1,100000) email_hash = md5(str(salt)+post_email).hexdigest() @@ -81,7 +89,9 @@ class RegistrationView (FreeAccessView, ThemeView): 'pi' : '', 'validation_link': 'http://' + current_site + '/portal/email_activation/'+ email_hash } - + + print "############ BREAKPOINT 5 #################" + # Construct user_hrn from email (XXX Should use common code) split_email = user_request['email'].split("@")[0] split_email = split_email.replace(".", "_") @@ -155,9 +165,12 @@ class RegistrationView (FreeAccessView, ThemeView): if not errors: create_pending_user(wsgi_request, user_request, user_detail) self.template_name = 'user_register_complete.html' + # log user activity + activity.user.register(self.request) return render(wsgi_request, self.template, {'theme': self.theme}) else: + print "############ BREAKPOINT A #################" user_request = {} ## this is coming from onelab website onelab.eu reg_form = { @@ -165,6 +178,9 @@ class RegistrationView (FreeAccessView, ThemeView): 'last_name': wsgi_request.GET.get('last_name', ''), 'email': wsgi_request.GET.get('email', ''), } + # log user activity + activity.user.signup(self.request) + print "############ BREAKPOINT B #################" template_env = { 'topmenu_items': topmenu_items_live('Register', page), @@ -175,4 +191,5 @@ class RegistrationView (FreeAccessView, ThemeView): template_env.update(user_request) template_env.update(reg_form) template_env.update(page.prelude_env ()) + print "############ BREAKPOINT C #################" return render(wsgi_request, self.template,template_env) diff --git a/portal/static/css/onelab.css b/portal/static/css/onelab.css index 5be52ddd..7d113240 100644 --- a/portal/static/css/onelab.css +++ b/portal/static/css/onelab.css @@ -389,7 +389,9 @@ a.sl-resources, a.sl-resources:hover { padding:2px 4px; -moz-border-radius: 4px; border-radius: 4px; - width:125px; + width:105px; + margin-left:4px; + margin-bottom:8px; text-align: center; } a.sl-resources.active, a.sl-resources.active:hover, a.sl-resources.active:focus { @@ -397,7 +399,13 @@ a.sl-resources.active, a.sl-resources.active:hover, a.sl-resources.active:focus -moz-border-radius: 4px; border-radius: 4px; } - +a.sl-resources:first-child { + margin-left:12px; +} +button.btn-apply { + font-size:13px; + padding:2px 8px; +} div#slice-info { margin-top:25px; } @@ -476,6 +484,8 @@ div#slice-info td { padding:3px 5px; } .slice-pending button.apply { + font-size:14px; + padding:2px 5px; } .slice-pending button.clear { } @@ -715,3 +725,10 @@ div.slogan { padding-top:60px; text-shadow: 1px 1px #013540; } + +th { + border:0 !important; +} +th.checkbox { + +} diff --git a/portal/templates/onelab/onelab_slice-view.html b/portal/templates/onelab/onelab_slice-view.html index 80576093..c2d52c35 100644 --- a/portal/templates/onelab/onelab_slice-view.html +++ b/portal/templates/onelab/onelab_slice-view.html @@ -1,11 +1,9 @@ {% extends "layout_wide.html" %} {% block head %} - {% endblock %} {% block content %} - {% include theme|add:"_widget-slice-sections.html" %}
diff --git a/portal/templates/onelab/onelab_supportview.html b/portal/templates/onelab/onelab_supportview.html index eb2a8dea..9f311a43 100644 --- a/portal/templates/onelab/onelab_supportview.html +++ b/portal/templates/onelab/onelab_supportview.html @@ -14,8 +14,7 @@
@@ -23,36 +22,7 @@
-
-
-

Report a Bug

-

If you have found a bug or having difficulties accesing some features or found some anomalies, please report it using our ticketing system.

- - -
-
-
+

Frequently Asked Questions (FAQs)

@@ -105,31 +75,53 @@

-
-
-

Contact Us

- -

Mailing List

-

You can subscribe to our mailing list by sending a request to: support (AT) onelab (DOT) eu

-

Also you can adress any issues in the same email address.

- -

Mailing Address

-
- UPMC - LIP6
- Boîte courrier 16
- Couloir 26-00, Etage 01, Bureau 102
- 4 place Jussieu
- 75252 PARIS CEDEX 05
- France
-
-
-
+
+
+
+

Contact Us

+
+
+

Mailing List

+

 

+

You can subscribe to our mailing list by sending a request at the following E-Mail address:

+

+ contact@onelab.eu +

+

Also you can adress any issues in the same email address.

+
+
+

Mailing Address

+

 

+

+ OneLab Team
+ UPMC - Laboratoire d'Informatique de Paris 6
+ Boite courrier 169
+ 4 place Jussieu
+ 75252 PARIS cedex 05
+ FRANCE +

+ + +
+
+
+
+

Report a Bug

+

If you have found a bug or having difficulties accesing some features or found some anomalies, + please report it using our ticketing system. +

+ +
+
+
+
+
{{ column }}{{ column }}