Fix location namespace
This commit is contained in:
parent
981854870a
commit
2b3cbc50b3
|
@ -1,30 +0,0 @@
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Name</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :name, :class=>"span4", :placeholder => "Area" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Picture</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.file_field :file %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Coordinates</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
|
|
||||||
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Description</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.submit "Save", :class=>"btn" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %>
|
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
||||||
<% end %>
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
<table class="table main-list">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="span1"><%= t('location.picture') %></th>
|
|
||||||
<th class="span1"><%= t('location.name') %></th>
|
|
||||||
<th class="span1"><%= t('location.longitude') %></th>
|
|
||||||
<th class="span1"><%= t('location.latitude') %></th>
|
|
||||||
<th class="span3"><%= t('location.description') %></th>
|
|
||||||
<%if is_manager? %>
|
|
||||||
<th class="span1"><%= t('location.edit') %></th>
|
|
||||||
<th class="span1"><%= t('location.delete') %></th>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody id="tbody_locations" class="sort-holder">
|
|
||||||
<% @locations.each do |location| %>
|
|
||||||
<tr class="with_action">
|
|
||||||
<td><%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %></td>
|
|
||||||
<td><%= location.name%></td>
|
|
||||||
<td><%= location.longitude%></td>
|
|
||||||
<td><%= location.latitude%></td>
|
|
||||||
<td><%= location.description%></td>
|
|
||||||
<%if is_manager? %>
|
|
||||||
<td><%= link_to 'Edit', edit_panel_locations_back_end_location_path(location) %></td>
|
|
||||||
<td><%= link_to 'Destroy', panel_locations_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>
|
|
||||||
<%end%>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<%if is_manager? %>
|
|
||||||
<td><%= link_to 'New', new_panel_locations_back_end_location_path %></td>
|
|
||||||
<% end %>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %>
|
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
||||||
<% end %>
|
|
|
@ -1,6 +1,6 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
namespace :panel do
|
namespace :panel do
|
||||||
namespace :locations do
|
namespace :location do
|
||||||
namespace :back_end do
|
namespace :back_end do
|
||||||
|
|
||||||
match "locations/get_locations" => "locations#get_locations"
|
match "locations/get_locations" => "locations#get_locations"
|
||||||
|
|
|
@ -36,7 +36,7 @@ module Location
|
||||||
available_for [:admin,:guest,:manager,:sub_manager]
|
available_for [:admin,:guest,:manager,:sub_manager]
|
||||||
active_for_controllers ({:private=>['locations']})
|
active_for_controllers ({:private=>['locations']})
|
||||||
|
|
||||||
head_link_path "panel_locations_back_end_locations_path"
|
head_link_path "panel_location_back_end_locations_path"
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue