forked from publiclab/spectral-workbench
-
Notifications
You must be signed in to change notification settings - Fork 12
/
dashboard.html.erb
executable file
·58 lines (41 loc) · 2.35 KB
/
dashboard.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<script language="javascript" type="text/javascript" src="/javascripts/flot/jquery.flot.js"></script>
<script language="javascript" type="text/javascript" src="/javascripts/flot/jquery.flot.crosshair.js"></script>
<div class="container">
<% if logged_in? && !flash[:notice] && !flash[:error] && !flash[:warning] && !mobile? %>
<% if current_user.spectra.length < 3 %>
<div class="alert error"><button type="button" class="close" data-dismiss="alert">×</button><b>Warning:</b> due to an error in the printed instructions, the webcam of your Desktop Spectrometry Kit may need to be refocused. <a href="http://publiclaboratory.org/wiki/spectral-workbench-help#the-spectrum-image-is-blurry-no-sharp-peaks">Read more »</a></div>
<% elsif current_user.spectra.length >= 3 %>
<div class="alert alert"><button type="button" class="close" data-dismiss="alert">×</button><a href="http://publiclaboratory.org">Share your research</a> and reach out to collaborators at <a href="http://publiclaboratory.org">PublicLaboratory.org</a>.</a></div>
<% end %>
<% end %>
<div class="row-fluid">
<div class="span4">
<h2>Dashboard</h2>
<hr />
<%= render :partial => 'spectrums/search' %>
<hr />
<p><strong>Subscribe to the "plots-spectrometry" mailing list</strong> for support, discussion, and to share your work:</p>
<form class="form" action="http://groups.google.com/group/plots-boston/boxsubscribe"><input type=text name=email /><br /> <input class="btn btn-primary" type=submit name="sub" value="Subscribe" /></form>
<hr />
<h3>Recent comments</h3>
<%= render :partial => 'comments' %>
<p><a href="/comments">More comments »</a></p>
<hr />
<h3>Recent authors</h3>
<ul class="nav">
<% User.find_all_by_login(@spectrums.collect(&:author).uniq).each do |user| %>
<li><a href="/profile/<%= user.login %>"><i class="icon icon-user"></i> <%= user.login %></a></li>
<% end %>
</ul>
<hr />
<h3>Recent sets</h3>
<%= render :partial => 'spectrums/sets' %>
<hr />
</div>
<div class="span8">
<h3 style="padding-top:0;">Recently uploaded spectra <small class="hidden-phone">by contributors like you</small></h3>
<%= render :partial => 'spectrums/list_bootstrap' %>
<%= will_paginate @spectrums %>
</div>
</div>
</div>