conflict fix
[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 {% widget "_widget-no_credentials.html" %}
10 <div class="container dashboard">
11         <div class="row">
12         {%if 'no_creds'  in user_cred %}
13         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">NO CREDENTIALS</a> are delegated to the portal!</p>
14         {%endif%}
15         {%if 'creds_expired'  in user_cred %}
16         <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>
17     {%endif%}
18                 {% if pi %}
19                 <div class="col-md-3">
20                         <h3>
21                                 EXPERIMENT
22                         </h3>
23                         <div>
24                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
25                         </div>
26                         <div>
27                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
28                         </div>
29                         <div>
30                                 <p><strong>Your slices </strong>
31                                         <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
32                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
33                                         However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
34                                         those slices will not appear here."
35                                         class="glyphicon glyphicon-info-sign">
36                                 </span>
37
38                                 </p>
39                         </div>
40                         <div>   
41                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
42                         </div>
43                         <h3 title="Some tools do their own slice creation and management.">Experiment now</h3>
44                         <a class="btn btn-primary" style="width: 150px;" 
45                     href='http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp'
46                                         title="Click here to start your experiment with jFed" 
47                                         onclick="return  launchApplication('http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp');">
48                     <span class="glyphicon glyphicon-cloud"></span> jFed</a>
49                 </div>
50                 <div class="col-md-3">
51                         <h3>MANAGEMENT</h3>
52                         <div>
53                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
54                         </div>
55                         <div>
56                                 <button id="projectrequestbtn" type="button" class="btn btn-default" style="width:165px;"><span class="glyphicon glyphicon-plus"></span> Join Project</button>
57                         </div>
58                         <div>
59                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
60                         </div>
61                         <div>
62                                 <p><strong>Your projects </strong>
63                                         <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."
64                                         class="glyphicon glyphicon-info-sign">
65                                 </span>
66                                 </p>
67                         </div>
68                         <div>   
69                                 <div id="home-project-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
70                         </div>
71
72                 </div>
73                 <div class="col-md-3">
74                         <h3>
75                                 SUPPORT
76                         </h3>
77                         <div>
78                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
79                         </div>
80                         <div>
81                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
82                         </div>
83                         <p></p>
84                         <div>
85                         <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>
86                         </div>
87                         <div>
88                         <button id="repbtn" type="button" style="width: 170px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' reputation</button>
89                         </div>
90                 </div>
91                 
92                 <div class="col-md-3">
93                         <h3>
94                                 ACCOUNT
95                         </h3>
96                         <div>
97                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
98                         </div>
99                         <div>
100                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
101                         </div>
102                         <div>
103                                 {% if person.last_name %}
104                                         {{person.first_name}} {{person.last_name}}<br />
105                                 {% endif %}
106                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
107                 </div>
108                 </div>
109         </div>
110         {%else%}
111         <div class="row">
112                 <div class="col-md-4">
113                         <h3>
114                                 EXPERIMENT
115                         </h3>
116                         <div>
117                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
118                         </div>
119                         <div>
120                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
121                         </div>
122                         <div>
123                                 <p><strong>Your slices </strong>
124                                 <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
125                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
126                                         However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
127                                         those slices will not appear here."
128                                         class="glyphicon glyphicon-info-sign">
129                                 </span>
130                                 </p>
131                         </div>
132                         <div>   
133                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
134                         </div>
135                         {% if pending_slices %}
136                         <p><strong>Pending slices</strong>
137                         <span title="Slices that you have requested and are pending for validation by the contact person of your organization."
138                                 class="glyphicon glyphicon-info-sign">
139                         <ul>
140                         {% for slices in pending_slices %}
141                         <li>{{slices}}</li>
142                         {% endfor %}
143                         </ul>
144                         </span>
145                         </p>
146                         {%endif%}
147                         <h3 title="Some tools do their own slice creation and management.">Experiment now</h3>
148                         <a class="btn btn-primary" style="width: 150px;" 
149                     href='http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp'
150                                         title="Click here to start your experiment with jFed" 
151                                         onclick="return  launchApplication('http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp');">
152                     <span class="glyphicon glyphicon-cloud"></span> jFed</a>    
153                 </div>
154                 <div class="col-md-4">
155                         <h3>
156                                 SUPPORT
157                         </h3>
158                         <div>
159                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
160                         </div>
161                         <div>
162                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
163                         </div>
164                         <p></p>
165                         <div>
166                         <button id="statbtn" type="button" style="width: 150px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' status</button>
167                         </div>
168                         <div>
169                         <button id="repbtn" type="button" style="width: 170px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' reputation</button>
170                         </div>
171                 </div>
172                 
173                 <div class="col-md-4">
174                         <h3>
175                                 ACCOUNT
176                         </h3>
177                         <div>
178                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
179                         </div>
180                         <div>
181                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
182                         </div>
183                         <div>
184                                 {% if person.last_name %}
185                                         {{person.first_name}} {{person.last_name}}<br />
186                                 {% endif %}
187                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
188                 </div>
189                 </div>
190         </div>
191         {%endif%}
192
193 </div>
194 {% else %}
195 <div class="container-fluid home">
196         <div class="">
197                 <div class="col-sm-2"></div>
198                 <div class="col-sm-4 slogan">
199                         <h2>
200                                 Fed4FIRE Portal
201                         </h2>
202                         <h3>
203                                 Your easy access to Future Internet Research and Experimentation testbeds belonging to the Fed4FIRE federation.
204                         </h3>
205                         <h3>
206                                  <a href='http://doc.fed4fire.eu'>Want to learn more?</a>
207                         </h3>
208                 </div>
209                 <div class="col-sm-4 col-sm-offset-1" style="width:400px; top:16px; float:left;">
210                         <div class="row">
211                                 {% widget '_widget-login-user.html' %}
212                         </div>
213                 </div>
214                 <div class="col-sm-1"></div>
215         </div>
216 </div>
217 {% endif %}
218
219
220 <script type="text/javascript">
221         $(document).ready(function() {
222                 $('a.home-tab').click(function() {
223                         $('ul.nav-tabs li').removeClass('active');
224                         $(this).parent().addClass('active');
225                         $('div.home-panel').hide();
226                         $('div#'+$(this).data('panel')).show();
227                 });
228                 $('button#validaterequestbtn').click(function() {
229                         window.location="/portal/institution#requests";
230                 });
231                 $('button#ticketbtn').click(function() {
232                         window.location="/portal/contact/";
233                 });
234                 $('button#statbtn').click(function() {
235                 window.location="https://flsmonitor.fed4fire.eu";
236                 });
237                  $('button#repbtn').click(function() {
238                 window.location="/portal/reputation";
239                  });
240                 $('button#signupbtn').click(function() {
241                         window.location="/portal/register/";
242                 });
243                 $('button#slicerequestbtn').click(function() {
244                         window.location="/portal/slice_request/";
245                 });
246                 $('button#projectrequestbtn').click(function() {
247                         window.location="/portal/project_request/";
248                 });
249
250         myslice.loadSlices();
251 });
252 </script>
253
254 <!--for jfed tool-->
255 <script type="text/javascript" src="{{STATIC_URL}}js/fed4fire_dtjava_orig.js"></script>
256 <script>
257         function launchApplication(jnlpfile) {
258         dtjava.launch(
259                 { url : jnlpfile },
260             {
261                 javafx : '2.2+',
262                 toolkit: 'swing'
263                 },
264                 {}
265         );
266         return false;
267      }
268 </script>
269 {# widget "_widget-monitor.html" #}
270 {# widget "_widget-stats-top-slices.html" #}
271
272 {% endblock %}