mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-14 11:15:48 -04:00
Form to delete your own account
This commit is contained in:
@@ -55,6 +55,7 @@ module ApplicationHelper
|
||||
# Falls back to Gravatar
|
||||
#
|
||||
def avatar_uri(member, size = 150)
|
||||
return unless member
|
||||
if member.preferred_avatar_uri.present?
|
||||
# Some avatars support different sizes
|
||||
# http://graph.facebook.com/12345678/picture?width=150&height=150
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
.col-md-11
|
||||
.comment-meta
|
||||
Posted by
|
||||
= link_to comment.author.login_name, member_path(comment.author)
|
||||
- if comment.author
|
||||
= link_to comment.author.login_name, member_path(comment.author)
|
||||
- else
|
||||
Deleted
|
||||
on
|
||||
= comment.created_at
|
||||
- if comment.updated_at > comment.created_at
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
.form-group
|
||||
= f.label :current_password, "Password required to delete", class: 'control-label col-md-2'
|
||||
.col-md-4
|
||||
= f.password_field :current_password, :class => 'form-control', id: 'current_pw_for_delete'
|
||||
= f.password_field :current_password, class: 'form-control', id: 'current_pw_for_delete'
|
||||
|
||||
.form-group
|
||||
.form-actions.col-md-offset-2.col-md-8
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
= link_to image_tag(avatar_uri(member, 150),
|
||||
alt: '',
|
||||
class: 'img img-responsive avatar'),
|
||||
member_path(member)
|
||||
- if member
|
||||
= link_to image_tag(avatar_uri(member, 150),
|
||||
alt: '',
|
||||
class: 'img img-responsive avatar'),
|
||||
member_path(member)
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
.post-meta
|
||||
%p
|
||||
Posted by
|
||||
= link_to post.author.login_name, member_path(post.author)
|
||||
- if post.author
|
||||
= link_to post.author.login_name, member_path(post.author)
|
||||
- else
|
||||
Deleted
|
||||
- if post.forum
|
||||
in
|
||||
= link_to post.forum, post.forum
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
= tag("meta", property: "og:url", content: request.original_url)
|
||||
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
|
||||
|
||||
- unless current_member
|
||||
- if @post.author && !current_member
|
||||
.alert.alert-info
|
||||
= link_to @post.author.login_name, member_path(@post.author)
|
||||
is using
|
||||
|
||||
11
db/schema.rb
11
db/schema.rb
@@ -239,8 +239,6 @@ ActiveRecord::Schema.define(version: 20170520060252) do
|
||||
t.float "longitude"
|
||||
t.decimal "area"
|
||||
t.string "area_unit"
|
||||
t.integer "width"
|
||||
t.integer "length"
|
||||
end
|
||||
|
||||
add_index "gardens", ["owner_id"], name: "index_gardens_on_owner_id", using: :btree
|
||||
@@ -490,14 +488,5 @@ ActiveRecord::Schema.define(version: 20170520060252) do
|
||||
|
||||
add_index "seeds", ["slug"], name: "index_seeds_on_slug", unique: true, using: :btree
|
||||
|
||||
create_table "squares", force: :cascade do |t|
|
||||
t.integer "garden_id"
|
||||
t.integer "x"
|
||||
t.integer "y"
|
||||
t.integer "planting_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
add_foreign_key "harvests", "plantings"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user