2014-08-10 17:06:58 +00:00
|
|
|
|
|
|
|
<!-- from left to right on the screen -->
|
|
|
|
|
|
|
|
<div class="upperLeftUI">
|
2016-04-13 02:50:51 +00:00
|
|
|
<!-- home button -->
|
|
|
|
<div class="homeButton">
|
2016-08-16 14:25:07 +00:00
|
|
|
<a href="<%= root_url %>" <% if current_user && !appsPage %><%= 'data-router=true' %><% end %>>METAMAPS</a>
|
2016-04-13 02:50:51 +00:00
|
|
|
</div> <!-- end homeButton -->
|
2014-08-10 17:06:58 +00:00
|
|
|
|
2016-04-13 02:50:51 +00:00
|
|
|
<!-- search box -->
|
|
|
|
<div class="sidebarSearch">
|
|
|
|
<input type="text" class="sidebarSearchField" placeholder="Search for topics, maps, and mappers..." />
|
|
|
|
<div id="searchLoading"></div>
|
|
|
|
<div class="sidebarSearchIcon"></div>
|
2014-08-10 17:06:58 +00:00
|
|
|
<div class="clearfloat"></div>
|
2016-04-13 02:50:51 +00:00
|
|
|
</div> <!-- end sidebarSearch -->
|
2016-10-17 00:22:00 +00:00
|
|
|
|
|
|
|
<% request = current_user && @map && @allrequests.find{|a| a.user == current_user}
|
2016-10-22 07:58:19 +00:00
|
|
|
className = (@map and not policy(@map).update?) ? 'isViewOnly ' : ''
|
2016-10-17 00:22:00 +00:00
|
|
|
if @map
|
|
|
|
className += 'sendRequest' if not request
|
|
|
|
className += 'sentRequest' if request and not request.answered
|
|
|
|
className += 'requestDenied' if request and request.answered and not request.approved
|
|
|
|
end %>
|
|
|
|
|
|
|
|
<div class="viewOnly <%= className %>">
|
|
|
|
<div class="eyeball">View Only</div>
|
|
|
|
<% if current_user %>
|
|
|
|
<div class="requestAccess requestNotice">Request Access</div>
|
|
|
|
<div class="requestPending requestNotice">Request Pending</div>
|
|
|
|
<div class="requestNotAccepted requestNotice">Request Not Accepted</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2016-04-13 02:50:51 +00:00
|
|
|
<div class="clearfloat"></div>
|
2014-08-10 17:06:58 +00:00
|
|
|
</div><!-- end upperLeftUI -->
|
|
|
|
|
|
|
|
<div class="upperRightUI">
|
2016-04-13 02:50:51 +00:00
|
|
|
<div class="mapElement upperRightEl upperRightMapButtons">
|
2016-10-22 07:58:19 +00:00
|
|
|
<% if current_user %>
|
|
|
|
<div class="importDialog upperRightEl upperRightIcon mapElement openLightbox" data-open="import-dialog-lightbox">
|
|
|
|
<div class="tooltipsUnder">
|
|
|
|
Import Data
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2016-10-07 16:16:37 +00:00
|
|
|
|
2016-04-13 02:50:51 +00:00
|
|
|
<!-- filtering -->
|
|
|
|
<div class="sidebarFilter upperRightEl">
|
|
|
|
<div class="sidebarFilterIcon upperRightIcon"><div class="tooltipsUnder">Filter</div></div>
|
|
|
|
<div class="sidebarFilterBox upperRightBox">
|
|
|
|
<%= render :partial => 'shared/filterBox' %>
|
|
|
|
</div>
|
|
|
|
</div> <!-- end sidebarFilter -->
|
2014-08-10 17:06:58 +00:00
|
|
|
|
2016-03-25 00:16:27 +00:00
|
|
|
<% if current_user %>
|
2016-04-13 02:50:51 +00:00
|
|
|
<!-- fork map -->
|
|
|
|
<div class="sidebarFork upperRightEl">
|
|
|
|
<div class="sidebarForkIcon upperRightIcon"><div class="tooltipsUnder">Save To New Map</div></div>
|
|
|
|
</div> <!-- end sidebarFork -->
|
2014-08-10 17:06:58 +00:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="clearfloat"></div>
|
2016-04-13 02:50:51 +00:00
|
|
|
</div> <!-- end mapElement -->
|
|
|
|
|
|
|
|
<% if current_user %>
|
|
|
|
<!-- create new map -->
|
2016-08-16 14:25:07 +00:00
|
|
|
<a href="<%= new_map_path %>" target="_blank" class="addMap upperRightEl upperRightIcon">
|
2016-08-16 12:03:06 +00:00
|
|
|
<div class="tooltipsUnder">
|
|
|
|
Create New Map
|
|
|
|
</div>
|
|
|
|
</a><!-- end addMap -->
|
2016-04-13 02:50:51 +00:00
|
|
|
<% end %>
|
|
|
|
|
2016-12-04 20:02:24 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
Metamaps.ServerData.unreadNotificationsCount = <%= user_unread_notification_count %>
|
|
|
|
</script>
|
2016-11-01 03:18:27 +00:00
|
|
|
<% if current_user.present? %>
|
2016-12-04 20:02:24 +00:00
|
|
|
<span id="notification_icon">
|
2016-12-08 19:39:41 +00:00
|
|
|
<%= link_to notifications_path, class: "notificationsIcon upperRightEl upperRightIcon #{user_unread_notification_count > 0 ? 'unread' : 'read'}" do %>
|
2016-12-04 20:02:24 +00:00
|
|
|
<div class="tooltipsUnder">
|
2016-12-08 19:39:41 +00:00
|
|
|
Notifications (<%= user_unread_notification_count %> unread)
|
2016-12-04 20:02:24 +00:00
|
|
|
</div>
|
2016-12-08 19:39:41 +00:00
|
|
|
<% if user_unread_notification_count > 0 %>
|
2016-12-04 20:02:24 +00:00
|
|
|
<div class="unread-notifications-dot"></div>
|
|
|
|
<% end %>
|
2016-11-01 03:18:27 +00:00
|
|
|
<% end %>
|
2016-12-04 20:02:24 +00:00
|
|
|
</span>
|
2016-11-01 03:18:27 +00:00
|
|
|
<% end %>
|
|
|
|
|
2016-04-13 02:50:51 +00:00
|
|
|
<!-- Account / Sign in -->
|
|
|
|
<% if !(controller_name == "sessions" && action_name == "new") %>
|
|
|
|
<div class="sidebarAccount upperRightEl">
|
|
|
|
<div class="sidebarAccountIcon"><div class="tooltipsUnder">Account</div>
|
|
|
|
<% if current_user && current_user.image %>
|
|
|
|
<%= image_tag current_user.image.url(:thirtytwo), :size => "32x32" %>
|
|
|
|
<% elsif !current_user %>
|
|
|
|
SIGN IN
|
|
|
|
<div class="accountInnerArrow"></div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="sidebarAccountBox upperRightBox">
|
|
|
|
<%= render :partial => 'layouts/account' %>
|
|
|
|
</div>
|
|
|
|
</div><!-- end sidebarAccount -->
|
|
|
|
<% end %>
|
|
|
|
<div class="clearfloat"></div>
|
2015-10-30 01:34:05 +00:00
|
|
|
</div><!-- end upperRightUI -->
|