#if not nmea.timestamp_1 and not nmea.timestamp_5:
# raise Http404
is_hidden = mmsi in get_hidden_mmsi()
- return render_to_response('vessel.html', {'nmea': nmea, 'is_hidden': is_hidden, 'form': HistoryForm()}, RequestContext(request))
+ hide_ship = is_hidden and not request.user.flag_allowhidden
+ return render_to_response('vessel.html', {'nmea': nmea, 'is_hidden': is_hidden, 'hide_ship': hide_ship,'form': HistoryForm()}, RequestContext(request))
class VesselManualInputForm(forms.Form):
{% endif %}
Draught: {{ nmea.get_draught_str }}<br>
<br>
+{% if hide_ship %}
+Sorry, access to the position of that ship is restricted. It is not available for you.
+<br>
+{% else %}
Status: {{ nmea.get_status }}<br>
Speed over ground: {{ nmea.get_sog_str }}<br>
Rotation: {{ nmea.get_rot_str }}<br>
ETA: {{ nmea.get_eta_str }}<br>
<br>
Sources: position by {{ nmea.get_source_1_str }}, voyage by {{ nmea.get_source_5_str }}<br>
-{% if is_hidden %}
<br>
+{% if is_hidden %}
That ship is hidden and the system is set up not to share her position with other ais web sites and peers.<br>
-{% endif %}
<br>
+{% endif %}
<br>
<a href=lastpos class=button>Position in google earth</a>
<h2>Get archive data</h2>
{% include "fragment_vessel_history.html" %}
+{% endif %}
{% endblock %}