Sha256: 6b087217eb6c7aa49da1141ee300c3f4378698907c47ac1f4615cb1be58f4adf

Contents?: true

Size: 1 KB

Versions: 15

Compression:

Stored size: 1 KB

Contents

<% if @crud_helper.scopes.present? %>
	<% if @crud_helper.scopes.class == Array %>
		<% @crud_helper.scopes.each do |escopo| %>
			<%= link_to "/crud/#{@model.name.underscore}?scope=#{escopo[0]}", id: "#{escopo[0]}", data: {push: true, crumb: 'wielka'} do%>
				<div style="float: left; margin-left: 10px; min-width: 100px; position:relative;">
					<div class="widget style1 gray-bg" style="padding:15px 0px!important;">
						<div class="row vertical-align text-center" style="margin:0!important;">
							<h3 class="font-bold" style="width:100%;">
								<%= escopo[1] %>
								<span class="label label-success pull-right" style="margin-left: 10px;">
									<% if current_usuario.present? %>
										<%= @model.send(escopo[0]).accessible_by(current_ability, :read).count %>
									<% else %>
										<%= @model.send(escopo[0]).count %>
									<% end %>
								</span>
							</h3>
						</div>
					</div>
				</div>
			<%end%>
		<% end %>
	<% else %>
		<%= render @crud_helper.scopes %>
	<% end %>
<% end %>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
templus_models-1.5.14 app/views/crud/_scopes.html.erb
templus_models-1.5.13 app/views/crud/_scopes.html.erb
templus_models-1.5.12 app/views/crud/_scopes.html.erb
templus_models-1.5.11 app/views/crud/_scopes.html.erb
templus_models-1.5.10 app/views/crud/_scopes.html.erb
templus_models-1.5.9 app/views/crud/_scopes.html.erb
templus_models-1.5.8 app/views/crud/_scopes.html.erb
templus_models-1.5.7 app/views/crud/_scopes.html.erb
templus_models-1.5.6 app/views/crud/_scopes.html.erb
templus_models-1.5.5 app/views/crud/_scopes.html.erb
templus_models-1.5.4 app/views/crud/_scopes.html.erb
templus_models-1.5.3 app/views/crud/_scopes.html.erb
templus_models-1.5.2 app/views/crud/_scopes.html.erb
templus_models-1.5.1 app/views/crud/_scopes.html.erb
templus_models-1.5.0 app/views/crud/_scopes.html.erb