iplemented rails admin
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
class Admin::SupportersController < Admin::ApplicationController
|
||||
def index
|
||||
@supporters = Supporter.desc(:created_at)
|
||||
end
|
||||
end
|
||||
@@ -1,6 +1,7 @@
|
||||
class Supporter
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::Paranoia
|
||||
include Geocoder::Model::Mongoid
|
||||
|
||||
COUNTER_START = 322
|
||||
@@ -20,6 +21,9 @@ class Supporter
|
||||
field :coordinates, type: Array
|
||||
field :comments, type: String
|
||||
field :language, type: String
|
||||
field :email2, type: String
|
||||
field :email3, type: String
|
||||
field :duplicate, type: Boolean, default: false
|
||||
|
||||
validates :first_name, presence: true
|
||||
validates :last_name, presence: true
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
h1 #{@supporters.count} Unterstützer
|
||||
table.table
|
||||
tr
|
||||
th Eingeschrieben
|
||||
th Adresse
|
||||
th Unterstützung
|
||||
th width="20%" Kommentar
|
||||
- @supporters.each do |supporter|
|
||||
tr
|
||||
td = distance_of_time_in_words_to_now(supporter.created_at)
|
||||
td
|
||||
address
|
||||
= "#{supporter.first_name} #{supporter.last_name}"
|
||||
=
|
||||
br
|
||||
= supporter.street
|
||||
br
|
||||
= "#{supporter.zip} #{supporter.city}"
|
||||
td
|
||||
= supporter.support
|
||||
- if supporter.li_membership
|
||||
br
|
||||
| Mitgliedschaft
|
||||
td = supporter.comments
|
||||
|
||||
Reference in New Issue
Block a user