Sha256: 62189ac8cedeb4bf5ef59789767fec1559d80ace7244ac3623391c15ed9c96d9

Contents?: true

Size: 1013 Bytes

Versions: 29

Compression:

Stored size: 1013 Bytes

Contents

<% if @crud_helper.scopes.present? %>
	<% if @crud_helper.scopes.class == Array %>
		<% @crud_helper.scopes.each do |escopo| %>
			<%= link_to crud_models_path(model: @model.name.underscore, scope: escopo[0]), id: "#{escopo[0]}", data: {push: true, crumb: 'wielka'} do%>
				<div style="float: left; margin-left: 10px;">
					<div class="widget style1 gray-bg" style="padding: 15px 10px !important;">
						<div class="row vertical-align text-center" style="margin:0!important;">
							<h3 class="font-bold" style="width:100%;">
								<%= I18n.t(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

29 entries across 29 versions & 1 rubygems

Version Path
templus_models-3.0.21 app/views/crud/_scopes.html.erb
templus_models-3.0.20 app/views/crud/_scopes.html.erb
templus_models-3.0.19 app/views/crud/_scopes.html.erb
templus_models-3.0.17 app/views/crud/_scopes.html.erb
templus_models-2.0.16 app/views/crud/_scopes.html.erb
templus_models-2.0.15 app/views/crud/_scopes.html.erb
templus_models-3.0.14 app/views/crud/_scopes.html.erb
templus_models-2.0.14 app/views/crud/_scopes.html.erb
templus_models-2.0.12 app/views/crud/_scopes.html.erb
templus_models-3.0.13 app/views/crud/_scopes.html.erb
templus_models-3.0.12 app/views/crud/_scopes.html.erb
templus_models-2.0.11 app/views/crud/_scopes.html.erb
templus_models-2.0.9 app/views/crud/_scopes.html.erb
templus_models-2.0.8 app/views/crud/_scopes.html.erb
templus_models-3.0.10 app/views/crud/_scopes.html.erb
templus_models-3.0.9 app/views/crud/_scopes.html.erb
templus_models-2.0.7 app/views/crud/_scopes.html.erb
templus_models-2.0.6 app/views/crud/_scopes.html.erb
templus_models-2.0.5 app/views/crud/_scopes.html.erb
templus_models-2.0.4 app/views/crud/_scopes.html.erb