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