From: Loic Baron Date: Thu, 22 Aug 2013 14:53:36 +0000 (+0200) Subject: added a page to list the platforms plugged into MySlice, need to be improved... X-Git-Tag: myslice-0.2-1~41^2~9 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=58e800e51fa670234f3933ece4e9d5c59383226d added a page to list the platforms plugged into MySlice, need to be improved... --- diff --git a/myslice/viewutils.py b/myslice/viewutils.py index c469d5cc..9be8941a 100644 --- a/myslice/viewutils.py +++ b/myslice/viewutils.py @@ -26,6 +26,7 @@ def topmenu_items (current,request=None): result.append({'label':'Home', 'href': '/login'}) result.append({ 'label':'Register', 'href': '/portal/user/register/'}) result.append({'label':'Contact Support', 'href': '/portal/contact/'}) + result.append({'label':'Platforms', 'href': '/portal/platforms/'}) for d in result: #if d['label'].lower()find(current)>=0: d['is_active']=True if d['label'] == current: d['is_active']=True diff --git a/plugins/query_editor/static/filter_input_integer.html b/plugins/query_editor/static/filter_input_integer.html index bf1a70cf..bdbacb69 100644 --- a/plugins/query_editor/static/filter_input_integer.html +++ b/plugins/query_editor/static/filter_input_integer.html @@ -1,2 +1,5 @@ - -  +
+ + - +
diff --git a/plugins/query_editor/static/filter_input_others.html b/plugins/query_editor/static/filter_input_others.html index cd4ba267..14e60335 100644 --- a/plugins/query_editor/static/filter_input_others.html +++ b/plugins/query_editor/static/filter_input_others.html @@ -1,4 +1,4 @@
- +
diff --git a/plugins/query_editor/static/filter_input_string.html b/plugins/query_editor/static/filter_input_string.html index b0d580ce..110f16d8 100644 --- a/plugins/query_editor/static/filter_input_string.html +++ b/plugins/query_editor/static/filter_input_string.html @@ -1,4 +1,4 @@
- +
diff --git a/portal/static/css/my_account.common.css b/portal/static/css/my_account.common.css index 82540a63..346aacdc 100644 --- a/portal/static/css/my_account.common.css +++ b/portal/static/css/my_account.common.css @@ -40,10 +40,10 @@ fieldset, img { body { background-color: #fff; - font-family: "Segoe UI", "Lucida Grande", "Helvetica" , sans-serif; - font-size: 12pt; - min-width: 1000px; /* ADDED July 2012 */ - margin: 0px auto; /* ADDED Aug 14, 2012 */ + /* font-family: "Segoe UI", "Lucida Grande", "Helvetica" , sans-serif; + font-size: 12pt; */ + min-width: 1000px; /* ADDED July 2012 */ + margin: 0px auto; /* ADDED Aug 14, 2012 */ } ol { diff --git a/portal/urls.py b/portal/urls.py index eba1c9cd..c0b9a96d 100644 --- a/portal/urls.py +++ b/portal/urls.py @@ -22,7 +22,7 @@ from django.conf.urls import patterns, include, url from portal import views -from portal.views import UserRegisterView, UserValidateView, DashboardView, PresViewView +from portal.views import UserRegisterView, UserValidateView, DashboardView, PresViewView, PlatformsView from portal.util import TemplateView # DEPRECATED #named_register_forms = ( @@ -44,6 +44,7 @@ urlpatterns = patterns('', url(r'^dashboard/?$', DashboardView.as_view(), name='dashboard'), #url(r'^my_account/?$', MyAccountView.as_view(), name='my_account'), url(r'^account/?$', views.my_account), + url(r'^platforms/?$', PlatformsView.as_view(), name='platforms'), url(r'^acc_process/?$', views.acc_process), url(r'^register/?$', views.register_4m_f4f), #url(r'^reg_process/?$', views.reg_4m_f4f_process), diff --git a/portal/views.py b/portal/views.py index df281fc8..abbb36e4 100644 --- a/portal/views.py +++ b/portal/views.py @@ -479,6 +479,41 @@ def my_account(request): 'username': the_user (request) }) +# View for platforms +class PlatformsView(TemplateView): + template_name = "platforms.html" + + def get_context_data(self, **kwargs): + page = Page(self.request) + + network_query = Query().get('local:platform').select('platform') + page.enqueue_query(network_query) + + page.expose_js_metadata() + page.expose_queries() + + networklist = SimpleList( + title = None, + page = page, + key = 'platform', + query = network_query, + ) + + context = super(PlatformsView, self).get_context_data(**kwargs) + context['person'] = self.request.user + context['networks'] = networklist.render(self.request) + + # XXX This is repeated in all pages + # more general variables expected in the template + context['title'] = 'Platforms connected to MySlice' + # the menu items on the top + context['topmenu_items'] = topmenu_items('Platforms', self.request) + # so we can sho who is logged + context['username'] = the_user(self.request) + + context.update(page.prelude_env()) + + return context #my_acc form value processing def acc_process(request):