update stylr
[unfold.git] / portal / templates / fed4fire / fed4fire_home-view.html
1 {% extends "layout_base.html" %}
2 {% load portal_filters %}
3
4 {% block content %}
5 <!-- <div class="row">
6 {% widget '_widget-news.html' %}
7 </div> -->
8 {% if username %}
9
10 {% block head %} 
11 <script type="text/javascript" src="https://java.com/js/dtjava.js"></script>
12 {% endblock head %}
13
14 {% widget "_widget-no_credentials.html" %}
15 <div class="container dashboard">
16         <div class="row">
17             <div class="col-md-12">
18         {%if 'no_creds'  in user_cred %}
19         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">NO CREDENTIALS</a> are delegated to the portal!</p>
20         {%endif%}
21         {%if 'creds_expired'  in user_cred %}
22         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">EXPIRED CREDENTIALS</a> Please delegate again your credentials to the portal!</p>
23     {%endif%}
24         </div>
25     </div>
26     <div class="row">
27         <div class="col-sm-4">
28             <h3>
29                 <a href="/portal/slice_request"><img src="{{ STATIC_URL }}img/icon_slices_small.png" alt="" /></a>EXPERIMENT
30             </h3>
31             
32             <div>
33                 Your projects and slices
34                 <span title="A <b>slice</b> is a set of testbed resources on which you can conduct an experiment. 
35                 Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
36                 However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
37                 those slices will not appear here. <br /><br /> A <b>project</b> is a sub-authority under the responsability of your institution gathering users, 
38                 who will be able to create slices for their experiments." class="glyphicon glyphicon-info-sign">&nbsp;</span> 
39             </div>
40             
41             <div>   
42                 <div id="home-project-tree"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
43             </div>
44             <div>
45                 <span class="glyphicon glyphicon-plus"></span> <a href="/portal/slice_request/">Create slice</a>
46                 <span class="glyphicon glyphicon-cog"></span> <a href="/portal/project_request/">Create/Join project</a>
47             </div>
48             
49             <div>
50                 <h3 title="Some tools do their own slice creation and management.">Experiment now</h3>
51                     <a class="btn btn-primary" id="webstart-button" style="width: 150px;" 
52                     href='http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp'
53                     title="Click here to start your experiment with jFed">
54                     <span class="glyphicon glyphicon-cloud"></span> jFed</a>
55             </div>
56         </div>
57         <div class="col-sm-4">
58             <div class="row">
59                 <h3>
60                     <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="" /></a>ACCOUNT
61                 </h3>
62                 {% if person.last_name %}
63                 <p>
64                     {{person.first_name}} {{person.last_name}}
65                 </p>
66                 {% endif %}
67                 <p>
68                     <span class="glyphicon glyphicon-user"></span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
69                 </p>
70             </div>
71             <div class="row">
72                 <h3>
73                     <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color_small.png" alt="" /></a>MANAGEMENT
74                 </h3>
75                
76                 <div>
77                     <span class="glyphicon glyphicon-ok"></span> <a href="/portal/institution#requests">Validate Requests</a>
78                 </div>
79             </div>
80         </div>
81         <div class="col-sm-4">
82             <div class="row">
83                 <h3>
84                     <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="" /></a>SUPPORT 
85                 </h3>
86                 <p>
87                     <span class="glyphicon glyphicon-envelope"></span> <a href="/portal/contact/">Contact</a>
88                 </p>
89                 <p>
90                     <span class="glyphicon glyphicon-stats"></span> <a target="_blank" href="https://flsmonitor.fed4fire.eu">Testbeds' status</a>
91                     </br />
92                     <span class="glyphicon glyphicon-stats"></span> <a href="/portal/reputation">Testbeds' reputation</a>
93                     
94                 </p>
95                 <p>
96                     <span class="glyphicon glyphicon-book"></span> <a target="_blank" href="http://doc.fed4fire.eu/">Documentation</a>
97                 </p>
98            
99             </div>
100             
101             
102         </div>
103     </div>
104 </div>
105 {% else %}
106 <div class="container-fluid home">
107         <div class="">
108                 <div class="col-sm-2"></div>
109                 <div class="col-sm-4 slogan">
110                         <h2>
111                                 Fed4FIRE Portal
112                         </h2>
113                         <h3>
114                                 Your easy access to Future Internet Research and Experimentation testbeds belonging to the Fed4FIRE federation.
115                         </h3>
116                         <h3>
117                                  <a href='http://doc.fed4fire.eu'>Want to learn more?</a>
118                         </h3>
119                 </div>
120                 <div class="col-sm-4 col-sm-offset-1" style="width:400px; top:16px; float:left;">
121                         <div class="row">
122                                 {% widget '_widget-login-user.html' %}
123                         </div>
124                 </div>
125                 <div class="col-sm-1"></div>
126         </div>
127 </div>
128 {% endif %}
129
130
131 <script type="text/javascript">
132         $(document).ready(function() {
133         $('#webstart-button').click(function(){
134             var platform8 = new dtjava.Platform({javafx: '8+', jvm: '1.8+'});
135             var config = {
136                 java8_jnlp: 'http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp',
137                 java7_jnlp: 'http://jfed.iminds.be/releases/r2269/webstart/experimenter/jfed-experimenter.jnlp'
138             };
139             var certkey = "{{jfed_identity}}";
140
141             dtjava.launch({url: config.java8_jnlp, params: {'login-certificate-string' : certkey } } , platform8, {});
142             //launchjFed();
143         });
144             {%if 'no_creds' in user_cred or 'creds_expired' in user_cred %}
145         localStorage.clear();
146         $.post("/cache/clear/", function( data ) {
147         });
148         {% endif %}
149                 $('a.home-tab').click(function() {
150                         $('ul.nav-tabs li').removeClass('active');
151                         $(this).parent().addClass('active');
152                         $('div.home-panel').hide();
153                         $('div#'+$(this).data('panel')).show();
154                 });
155                 
156 });
157 </script>
158
159 <!--
160 for jfed tool
161 <script type="text/javascript" src="{{STATIC_URL}}js/fed4fire_dtjava_orig.js"></script>
162 <script>
163         function launchApplication(jnlpfile) {
164         dtjava.launch(
165                 { url : jnlpfile },
166             {
167                 javafx : '2.2+',
168                 toolkit: 'swing'
169                 },
170                 {}
171         );
172         return false;
173      }
174 </script>
175 -->
176
177 {% endblock %}