Sha256: f7a339960485ef9abbda6d2b37643c34214ba935f9ad2541ce185833dc454ff0

Contents?: true

Size: 1005 Bytes

Versions: 15

Compression:

Stored size: 1005 Bytes

Contents

<%
  if comp
    events = nil unless locals.include? :events
    events = comp.events || events
    class_name = 'v-avatar' unless locals.include? :class_name
    position = comp.position||[] unless locals.include? :position
    position_classes = position.map {|p| "v-avatar-position-#{p}"}.join(' ')
%>
  <% if %w(jpg gif png).include?(comp.avatar&.to_s.split('.').last) %>
    <span class="<%=class_name%> <%=position_classes%>">
    <img id="<%= comp.id %>"
         class="v-avatar
               <%= 'v-actionable' if events %>"
         src="<%= comp.avatar %>"
         <%= erb :"components/event", :locals => {events: events, parent_id: comp.event_parent_id} %> />
      <%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>
    </span>
  <% else %>
    <span class="v-avatar <%=position_classes%>">
    <%= erb :"components/icon", :locals => {comp: comp, icon_name: comp.avatar, parent_id: comp.event_parent_id, position: []} %>
    </span>
  <% end %>

<% end %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
voom-presenters-0.2.0 views/mdc/components/avatar.erb
voom-presenters-0.1.13 views/mdc/components/avatar.erb
voom-presenters-0.1.12 views/mdc/components/avatar.erb
voom-presenters-0.1.11 views/mdc/components/avatar.erb
voom-presenters-0.1.10 views/mdc/components/avatar.erb
voom-presenters-0.1.9 views/mdc/components/avatar.erb
voom-presenters-0.1.8 views/mdc/components/avatar.erb
voom-presenters-0.1.7 views/mdc/components/avatar.erb
voom-presenters-0.1.6 views/mdc/components/avatar.erb
voom-presenters-0.1.5 views/mdc/components/avatar.erb
voom-presenters-0.1.4 views/mdc/components/avatar.erb
voom-presenters-0.1.3 views/mdc/components/avatar.erb
voom-presenters-0.1.2 views/mdc/components/avatar.erb
voom-presenters-0.1.1 views/mdc/components/avatar.erb
voom-presenters-0.1.0 views/mdc/components/avatar.erb