diff views/index.jade @ 15:c5bf4e02958e

add/delete credentials, new layout, alpha version ribbon, contact
author Mathias Gebbe <mgebbe@intevation.de>
date Thu, 12 Jun 2014 20:51:10 +0200
parents f190abf340ef
children 3e3fa35e3ce2
line wrap: on
line diff
--- a/views/index.jade	Thu Jun 12 10:36:52 2014 +0200
+++ b/views/index.jade	Thu Jun 12 20:51:10 2014 +0200
@@ -37,12 +37,12 @@
 
      gapi.signin.render('gp-root', {
       'callback': 'signinCallback',
-      'clientid': 'GOOGLEPLUSCLIENTID.apps.googleusercontent.com',
+      'clientid': 'GOOGLEPLUSID.apps.googleusercontent.com',
       'redirecturi': 'postmessage',
       'response_type' : 'code',
       'accesstype': 'offline',
       'approvalprompt': 'force',
-      'cookiepolicy': "https://pumpbridge.me",
+      'cookiepolicy': "https://server.example",
       'requestvisibleactions': 'http://schemas.google.com/AddActivity',
       'scope': 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'
      });
@@ -96,10 +96,34 @@
      }
 
 
-
     // load facebook api
     script.
      $(document).ready(function () {
+         var usermapfb="#{usermapfb}";
+         var usermaptw="#{usermaptw}";
+         var usermapgp="#{usermapgp}";
+
+         if(usermapfb == 'true'){
+           $('#fbloginbutton2').addClass('hide');
+           $('#fbdeletebutton').removeClass('hide');
+         }else{
+           $('#fbloginbutton2').removeClass('hide');
+           $('#fbdeletebutton').addClass('hide');
+         }
+         if(usermaptw == 'true'){
+           $('#twloginbutton2').addClass('hide');
+           $('#twdeletebutton').removeClass('hide');
+         }else{
+           $('#twloginbutton2').removeClass('hide');
+           $('#twdeletebutton').addClass('hide');
+         }
+         if(usermapgp == 'true'){
+           $('#gploginbutton2').addClass('hide');
+           $('#gpdeletebutton').removeClass('hide');
+         }else{
+           $('#gploginbutton2').removeClass('hide');
+           $('#gpdeletebutton').addClass('hide');
+         }
 
          var twstatus = getCookie('twitterid')
          if (twstatus != "") $('#twstatus').html('<a href=https://twitter.com/account/redirect_by_id/' + twstatus + '> ' + getCookie('twitteruser') + '</a>');
@@ -110,7 +134,7 @@
 
          $.getScript('//connect.facebook.net/de_DE/all.js', function () {
              FB.init({
-                 appId: 'FACEBOOKCLIENTID',
+                 appId: 'FACEBOOKID',
                  status: true
              });
 
@@ -161,10 +185,12 @@
   body
    block content
   .main
-      h1(class='headline') pumpbridge.<br>connecting social networks
+      .headlinebox
+        img(class="ribbon", src="/images/ribbonl.png")
+        h1(class='headline') pumpbridge.<br>connecting social networks
       #pump-root.pump-root
         h4
-          | logged in as:
+          | logged in as:&nbsp;
           a(id='pumpstatus',class='pumpstatus',href=user.homepage)=user.id
       #fb.fb
         #fb-root.fb-root
@@ -174,8 +200,10 @@
           br
           form(class='',action='/bridge',method='post')
            input(id='fbdeleted',name='fbdelete',hidden='true',value=user.id)
-           button(type='submit',class='btn btn-default btn-xs')
+           button(id='fbdeletebutton',type='submit',class='btn btn-default btn-xs',hidden='true')
             | delete credentials
+          button(id='fbloginbutton2',name='fbloginbutton2',class='btn btn-default btn-xs',onClick='$("#fbloginbutton").click()')
+           | add credentials
       #gp.gp
         #gp-root.gp-root
            input(id='gploginbutton',type='image',class='gploginbutton',value='gpLogin',src='images/gp.svg',width='100px',height='100px')
@@ -184,8 +212,10 @@
           br
           form(class='',action='/bridge',method='post')
            input(id='gpdeleted',name='gpdelete',hidden='true',value=user.id)
-           button(type='submit',class='btn btn-default btn-xs')
+           button(name='gpdeletebutton',id='gpdeletebutton',type='submit',class='btn btn-default btn-xs')
             | delete credentials
+          button(id='gploginbutton2',name='gploginbutton2',class='btn btn-default btn-xs',onClick='$("#gploginbutton").click()')
+           | add credentials
       #tw.tw
         #tw-root.tw-root
           a(href='/add-account'): input(type='image',value='twitterlogin',src='images/twitter.svg',width='100px',height='100px')
@@ -194,8 +224,10 @@
           br
           form(class='',action='/bridge',method='post')
            input(id='twdeleted',name='twdelete',hidden='true',value=user.id)
-           button(type='submit',class='btn btn-default btn-xs')
+           button(id='twdeletebutton',type='submit',class='btn btn-default btn-xs')
             | delete credentials
+          button(id='twloginbutton2',name='twloginbutton2',type='submit',class='btn btn-default btn-xs',onClick='location.href="/add-account"')
+           | add credentials
        form(class='',action='/bridge',method='post')
          input(id='pumpid',name='pumpid',hidden='true',value=user.id)
          input(id='pumptoken',name='pumptoken',hidden='true', value=user.token)
@@ -206,6 +238,10 @@
          input(id='gpid',name='gpid',hidden='true')
          input(id='gptoken',name='gptoken',hidden='true',size=100)
          br
+         | you need to extra save the credentials
+         br
+         | for facebook and googleplus
+         br
          input(type='submit',class='btn btn-default',value='save credentials')
    .footer
     #logout.logout
@@ -214,6 +250,8 @@
           input(type='submit',class='btn btn-default',value='logout')
          br
      p.
-      here our bridge will be.
-      <br> visit <a href=https://wald.intevation.org/projects/pumpbridge/>https://wald.intevation.org/projects/pumpbridge/</a>
-
+       <a href=https://wald.intevation.org/hg/pumpbridge/>pumpbridge</a> is Free Software and available under the Apache License 2.0.
+       <br>
+       visit <a href=https://wald.intevation.org/projects/pumpbridge/>https://wald.intevation.org/projects/pumpbridge</a> for more informations!
+       <br>
+       pumpbridge is hosted and operated by <a href=https://io.intevation.de/mgebbe>Mathias Gebbe</a> <a href=/contact.html>(Contact)</a>      <br>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)