cosmetic 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
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 class="projects-tree">
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              
40                 <div id="home-project-tree"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
41             </div>
42             <div>
43                 
44                 <br />
45                 <span class="glyphicon glyphicon-cog"></span> <a href="/portal/project_request/">Create/Join project</a>
46                 <br />
47                 <span class="glyphicon glyphicon-plus"></span> <a href="/portal/slice_request/">Create slice</a>
48             </div>
49             
50             <div class="experiment-tools">
51                 <h4 title="Some tools do their own slice creation and management.">Experiment now</h4>
52                 <p>
53                     <a class="btn btn-primary" id="webstart-button"
54                         href='http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp'
55                         title="Click here to start your experiment with jFed">
56                         <span class="glyphicon glyphicon-cloud"></span> jFed</a>
57                 </p>
58             </div>
59         </div>
60         <div class="col-sm-4">
61             <div class="row">
62                 <div class="col-sm-12">
63                     <h3>
64                         <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="" /></a>ACCOUNT
65                     </h3>
66                     {% if person.last_name %}
67                     <p>
68                         {{person.first_name}} {{person.last_name}}
69                     </p>
70                     {% endif %}
71                     <p>
72                         <span class="glyphicon glyphicon-user"></span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
73                     </p>
74                 </div>
75             </div>
76             <div class="row">
77                 <div class="col-sm-12">
78                     <h3>
79                         <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color_small.png" alt="" /></a>MANAGEMENT
80                     </h3>
81                    
82                     <div>
83                         <span class="glyphicon glyphicon-ok"></span> <a href="/portal/institution#requests">Validate Requests</a>
84                     </div>
85                 </div>
86             </div>
87         </div>
88         <div class="col-sm-4">
89             <div class="row">
90                 <div class="col-sm-12">
91                     <h3>
92                         <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="" /></a>SUPPORT 
93                     </h3>
94                     <p>
95                         <span class="glyphicon glyphicon-envelope"></span> <a href="/portal/contact/">Contact</a>
96                     </p>
97                     <p>
98                         <span class="glyphicon glyphicon-stats"></span> <a target="_blank" href="https://flsmonitor.fed4fire.eu">Testbeds' status</a>
99                         </br />
100                         <span class="glyphicon glyphicon-stats"></span> <a href="/portal/reputation">Testbeds' reputation</a>
101                         
102                     </p>
103                     <p>
104                         <span class="glyphicon glyphicon-book"></span> <a target="_blank" href="http://doc.fed4fire.eu/">Documentation</a>
105                     </p>
106                 </div>
107             </div>            
108         </div>
109     </div>
110 </div>
111 {% else %}
112 <div class="container home">
113         <div class="">
114                 <div class="col-sm-4 col-sm-offset-1 slogan">
115                         <h1>
116                                 Fed4FIRE Portal
117                         </h1>
118                         <h3>
119                                 Your easy access to Future Internet Research and Experimentation testbeds belonging to the 
120                                 <a target="_blank" href="http://www.fed4fire.eu/">Fed4FIRE</a> federation.
121                         </h3>
122                         <br />
123                         <h4>
124                                  <a href='http://doc.fed4fire.eu'>Want to learn more?</a>
125                         </h4>
126                 </div>
127                 <div class="col-sm-4 col-sm-offset-1" style="width:400px; top:16px; float:left;">
128                         <div class="row">
129                                 {% widget '_widget-login-user.html' %}
130                         </div>
131                 </div>
132         </div>
133 </div>
134 {% endif %}
135
136
137 <script type="text/javascript">
138         $(document).ready(function() {
139         $('#webstart-button').click(function(){
140             var platform8 = new dtjava.Platform({javafx: '8+', jvm: '1.8+'});
141             var config = {
142                 java8_jnlp: 'http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp',
143                 java7_jnlp: 'http://jfed.iminds.be/releases/r2269/webstart/experimenter/jfed-experimenter.jnlp'
144             };
145             var certkey = "{{jfed_identity}}";
146
147             dtjava.launch({url: config.java8_jnlp, params: {'login-certificate-string' : certkey } } , platform8, {});
148             //launchjFed();
149         });
150             {%if 'no_creds' in user_cred or 'creds_expired' in user_cred %}
151         localStorage.clear();
152         $.post("/cache/clear/", function( data ) {
153         });
154         {% endif %}
155                 $('a.home-tab').click(function() {
156                         $('ul.nav-tabs li').removeClass('active');
157                         $(this).parent().addClass('active');
158                         $('div.home-panel').hide();
159                         $('div#'+$(this).data('panel')).show();
160                 });
161                 
162 });
163 </script>
164
165 <!--
166 for jfed tool
167 <script type="text/javascript" src="{{STATIC_URL}}js/fed4fire_dtjava_orig.js"></script>
168 <script>
169         function launchApplication(jnlpfile) {
170         dtjava.launch(
171                 { url : jnlpfile },
172             {
173                 javafx : '2.2+',
174                 toolkit: 'swing'
175                 },
176                 {}
177         );
178         return false;
179      }
180 </script>
181 -->
182
183 {% endblock %}