/portal/urls.py: Merge conflict solved
authorYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 22 Aug 2013 16:37:38 +0000 (18:37 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 22 Aug 2013 16:37:38 +0000 (18:37 +0200)
myslice/viewutils.py
plugins/query_editor/static/filter_input_integer.html
plugins/query_editor/static/filter_input_others.html
plugins/query_editor/static/filter_input_string.html
portal/static/css/dashboard.css
portal/static/css/my_account.common.css
portal/templates/dashboard.html
portal/templates/platforms.html [new file with mode: 0644]
portal/urls.py
portal/views.py

index bc635bf..3f1da63 100644 (file)
@@ -26,6 +26,7 @@ def topmenu_items (current,request=None):
         result.append({'label':'Home', 'href': '/login'})
         result.append({ 'label':'Register', 'href': '/portal/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
index bf1a70c..bdbacb6 100644 (file)
@@ -1,2 +1,5 @@
-<input class='queryeditor-filter-min' id='{{domid}}__field__{{field}}__min' type=text size=3 value='{{ min }}'></input>&nbsp;-&nbsp;
+<div class="ui-widget content" style="margin-top:0px;">
+<label for='{{field}}'></label>
+<input class='queryeditor-filter-min' id='{{domid}}__field__{{field}}__min' type=text size=3 value='{{ min }}'></input>&nbsp;-
 <input class='queryeditor-filter-max' id='{{domid}}__field__{{field}}__max' type=text size=3 value='{{ max }}'></input>
+</div>
index cd4ba26..14e6033 100644 (file)
@@ -1,4 +1,4 @@
 <div class='ui-widget content' style='margin-top:0px;'>
     <label for='{{field}}'></label>
-    <input class='queryeditor-auto-filter' id='{{domid}}__field__{{field}}' type=text></input>
+    <input class='queryeditor-auto-filter' id='{{domid}}__field__{{field}}' type='text' style='width:206px;'></input>
 </div>
index b0d580c..110f16d 100644 (file)
@@ -1,4 +1,4 @@
 <div class='ui-widget content' style='margin-top:0px;'>
   <label for='{{domid}}__field__{{field}}'></label>
-  <input class='queryeditor-auto-filter' id='{{domid}}__field__{{field}}' type=text></input>
+  <input class='queryeditor-auto-filter' id='{{domid}}__field__{{field}}' type='text' style='width:206px;'></input>
 </div>
index 22d90cf..d5b6361 100644 (file)
@@ -39,6 +39,9 @@
     position: relative;
     top: 1em;
     width: 45%;
+    min-height:200px;
+    height:auto !important;
+    height:200px; 
 }
 
 #ms-dashboard-slices {
@@ -54,6 +57,9 @@
     padding: 15px;
     top: 0.5em;
     width: 45%;
+    min-height:200px;
+    height:auto !important;
+    height:200px; 
 }
 
 li.icn {
index 82540a6..346aacd 100644 (file)
@@ -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 {
index bc4be75..df5c211 100644 (file)
@@ -18,6 +18,7 @@
         <li><span id='username'>{{person.first_name}} {{person.last_name}}</span></li>
         <li><b>Email: </b><a href='mailto:#'>{{person.email}}</a></li>
       </ul>
+      <button id="account" onclick="location.href='{{URL}}/portal/account'" class="btn">Modify</button>
     </div>
   </div>
 
diff --git a/portal/templates/platforms.html b/portal/templates/platforms.html
new file mode 100644 (file)
index 0000000..33fb0b3
--- /dev/null
@@ -0,0 +1,11 @@
+{% extends "layout-unfold1.html" %}
+
+{% block head %}
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/dashboard.css" />
+{% endblock %}
+
+{% block unfold1_main %}
+
+<h1>Platforms</h1>
+{{networks}}
+{% endblock %}
index f0e5ecd..9882845 100644 (file)
@@ -23,6 +23,7 @@
 from django.conf.urls import patterns, include, url
 from portal           import views
 from portal.views     import  DashboardView, PresViewView
+from portal.views     import DashboardView, PresViewView, PlatformsView
 from portal.util      import TemplateView
 
 # DEPRECATED #named_register_forms = (
@@ -44,6 +45,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),
index cf5f59d..f8899eb 100644 (file)
@@ -29,7 +29,7 @@ from django.views.generic.base   import TemplateView
 from django.shortcuts            import render
 
 from plugins.lists.simplelist    import SimpleList
-
+from plugins.hazelnut            import Hazelnut
 from plugins.pres_view           import PresView
 from portal.event import Event
 import json
@@ -479,6 +479,57 @@ 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','platform_longname','gateway_type')
+        page.enqueue_query(network_query)
+
+        page.expose_js_metadata()
+        page.expose_queries()
+        networklist = Hazelnut(
+            page  = page,
+            title = 'List',
+            domid = 'checkboxes',
+            # this is the query at the core of the slice list
+            query = network_query,
+            query_all = network_query,
+            checkboxes = False,
+            datatables_options = {
+            # for now we turn off sorting on the checkboxes columns this way
+            # this of course should be automatic in hazelnut
+            'aoColumns'      : [None, None, None, None, {'bSortable': False}],
+            'iDisplayLength' : 25,
+            'bLengthChange'  : True,
+            },
+        )
+#
+#        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):