Several modifications in fed4fire UI + Slice creation is restricted under projects...
[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 {% block head %} 
10 <script type="text/javascript" src="https://java.com/js/dtjava.js"/>
11 <script type="text/javascript">
12 </script>
13 {% endblock head %}
14
15 {% widget "_widget-no_credentials.html" %}
16 <div class="container dashboard">
17         <div class="row">
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 class="col-md-3">
25                         <h3>
26                                 EXPERIMENT
27                         </h3>
28                         <div>
29                                 <a href="/portal/slice_request"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
30                         </div>
31                         <div>
32                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create slice</button>
33                         </div>
34                         <div>
35                                 <p><strong>Your slices </strong>
36                                         <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
37                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
38                                         However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
39                                         those slices will not appear here."
40                                         class="glyphicon glyphicon-info-sign">
41                                 </span>
42
43                                 </p>
44                         </div>
45                         <div>   
46                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
47                         </div>
48                         <h3 title="Some tools do their own slice creation and management.">Experiment now</h3>
49                         <a class="btn btn-primary" id="webstart-button" style="width: 150px;" 
50                     href='http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp'
51                                         title="Click here to start your experiment with jFed">
52                     <span class="glyphicon glyphicon-cloud"></span> jFed</a>
53                 </div>
54                 <div class="col-md-3">
55                         <h3>MANAGEMENT</h3>
56                         <div>
57                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
58                         </div>
59                         <div>
60                                 <button id="projectrequestbtn" type="button" class="btn btn-default" style="width:165px;"><span class="glyphicon glyphicon-plus"></span> Create/Join project</button>
61                         </div>
62                         <div>
63                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
64                         </div>
65                         <div>
66                                 <p><strong>Your projects </strong>
67                                         <span title="A project is a sub-authority under the responsability of your institution gathering users, who will be able to create slices for their experiments."
68                                         class="glyphicon glyphicon-info-sign">
69                                 </span>
70                                 </p>
71                         </div>
72                         <div>   
73                                 <div id="home-project-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
74                         </div>
75
76                 </div>
77                 <div class="col-md-3">
78                         <h3>
79                                 SUPPORT
80                         </h3>
81                         <div>
82                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
83                         </div>
84                         <div>
85                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
86                         </div>
87                         <p></p>
88                         <div>
89                         <button id="statbtn" type="button" style="width: 170px;" class="btn btn-default"><span class="glyphicon glyphicon-stats" style="margin-right: 10px;"></span>Testbeds' status</button>
90                         </div>
91                         <div>
92                         <button id="repbtn" type="button" style="width: 170px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' reputation</button>
93                         </div>
94                 </div>
95                 
96                 <div class="col-md-3">
97                         <h3>
98                                 ACCOUNT
99                         </h3>
100                         <div>
101                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
102                         </div>
103                         <div>
104                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
105                         </div>
106                         <div>
107                                 {% if person.last_name %}
108                                         {{person.first_name}} {{person.last_name}}<br />
109                                 {% endif %}
110                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
111                 </div>
112                 </div>
113         </div>
114
115 </div>
116 {% else %}
117 <div class="container-fluid home">
118         <div class="">
119                 <div class="col-sm-2"></div>
120                 <div class="col-sm-4 slogan">
121                         <h2>
122                                 Fed4FIRE Portal
123                         </h2>
124                         <h3>
125                                 Your easy access to Future Internet Research and Experimentation testbeds belonging to the Fed4FIRE federation.
126                         </h3>
127                         <h3>
128                                  <a href='http://doc.fed4fire.eu'>Want to learn more?</a>
129                         </h3>
130                 </div>
131                 <div class="col-sm-4 col-sm-offset-1" style="width:400px; top:16px; float:left;">
132                         <div class="row">
133                                 {% widget '_widget-login-user.html' %}
134                         </div>
135                 </div>
136                 <div class="col-sm-1"></div>
137         </div>
138 </div>
139 {% endif %}
140
141
142 <script type="text/javascript">
143         $(document).ready(function() {
144         $('#webstart-button').click(function(){
145             var platform8 = new dtjava.Platform({javafx: '8+', jvm: '1.8+'});
146             var config = {
147                 java8_jnlp: 'http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp',
148                 java7_jnlp: 'http://jfed.iminds.be/releases/r2269/webstart/experimenter/jfed-experimenter.jnlp'
149             };
150             var certkey = "{{jfed_identity}}";
151
152             dtjava.launch({url: config.java8_jnlp, params: {'login-certificate-string' : certkey } } , platform8, {});
153             //launchjFed();
154         });
155             {%if 'no_creds' in user_cred or 'creds_expired' in user_cred %}
156         localStorage.clear();
157         $.post("/cache/clear/", function( data ) {
158         });
159         {% endif %}
160                 $('a.home-tab').click(function() {
161                         $('ul.nav-tabs li').removeClass('active');
162                         $(this).parent().addClass('active');
163                         $('div.home-panel').hide();
164                         $('div#'+$(this).data('panel')).show();
165                 });
166                 $('button#validaterequestbtn').click(function() {
167                         window.location="/portal/institution#requests";
168                 });
169                 $('button#ticketbtn').click(function() {
170                         window.location="/portal/contact/";
171                 });
172                 $('button#statbtn').click(function() {
173                 window.location="https://flsmonitor.fed4fire.eu";
174                 });
175                  $('button#repbtn').click(function() {
176                 window.location="/portal/reputation";
177                  });
178                 $('button#signupbtn').click(function() {
179                         window.location="/portal/register/";
180                 });
181                 $('button#slicerequestbtn').click(function() {
182                         window.location="/portal/slice_request/";
183                 });
184                 $('button#projectrequestbtn').click(function() {
185                         window.location="/portal/project_request/";
186                 });
187
188         myslice.loadSlices();
189 });
190 </script>
191
192 <!--
193 for jfed tool
194 <script type="text/javascript" src="{{STATIC_URL}}js/fed4fire_dtjava_orig.js"></script>
195 <script>
196         function launchApplication(jnlpfile) {
197         dtjava.launch(
198                 { url : jnlpfile },
199             {
200                 javafx : '2.2+',
201                 toolkit: 'swing'
202                 },
203                 {}
204         );
205         return false;
206      }
207 </script>
208 -->
209 {# widget "_widget-monitor.html" #}
210 {# widget "_widget-stats-top-slices.html" #}
211
212 {% endblock %}