Location - category fixes
Conflicts: app/models/category.rb vendor/built_in_modules/location/init.rb
This commit is contained in:
1 parent
109b891b27
commit
7ea9945af0
5 files changed
+58
-1
No files matched your search
Vendored
+2
@@ -6,6 +6,7 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
||||
|
||||
def index
|
||||
@location_infos = LocationInfo.all
|
||||
@categories = get_categories_for_index
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.json { render json: @locations }
|
||||
@@ -14,6 +15,7 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
||||
|
||||
def new
|
||||
@location_info = LocationInfo.new
|
||||
@categories = get_categories_for_index
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
class Location
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include OrbitCategory::Categorizable
|
||||
|
||||
mount_uploader :file, LocationUploader
|
||||
|
||||
|
||||
Vendored
+10
@@ -23,6 +23,16 @@
|
||||
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Category -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:category) %></label>
|
||||
<div class="controls">
|
||||
<%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for=""><%= t 'description' %></label>
|
||||
<div class="controls">
|
||||
|
||||
Reference in new issue
Block a user