remove cms, small fix

This commit is contained in:
Torsten 2023-01-12 22:24:36 +02:00
parent a9967a0127
commit 125117b71f
4 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@ module MembersHelper
def image_for(someone , classes = "") def image_for(someone , classes = "")
if someone.picture.blank? if someone.picture.blank?
image = asset_url("no_image") image = asset_url("no_image.png")
else else
image = someone.picture.url image = someone.picture.url
end end
@ -13,6 +13,6 @@ module MembersHelper
return "Not arrived" if member.arrived.blank? return "Not arrived" if member.arrived.blank?
text = member.arrived.to_s text = member.arrived.to_s
return text + " not left" if member.left.blank? return text + " not left" if member.left.blank?
text + " " + distance_of_time_in_words( member.left , member.arrived) text + " " + distance_of_time_in_words( member.left , member.arrived)
end end
end end

View File

@ -6,11 +6,11 @@ class Member < ApplicationRecord
mount_uploader :picture, PictureUploader mount_uploader :picture, PictureUploader
has_many :stories has_many :stories
def admin def admin
true self.email == "torsten@villataika.fi"
end end
def admin? def admin?
true self.email == "torsten@villataika.fi"
end end
end end

View File

@ -59,7 +59,7 @@
.pt-8.mt-8.border-t.border-gray-100 .pt-8.mt-8.border-t.border-gray-100
.grid.grid-cols-1.gap-8.lg:grid-cols-2 .grid.grid-cols-1.gap-8.lg:grid-cols-2
%p.text-xs.text-left.text-gray-500 %p.text-xs.text-left.text-gray-500
2020-22. Osuuskunta Hub Feenix. All rights reserved. 2020-23. Osuuskunta Hub Feenix. All rights reserved.
%nav{"aria-label" => "Footer Navigation - Support"} %nav{"aria-label" => "Footer Navigation - Support"}
%ul.flex.flex-wrap.justify-start.gap-4.text-xs.lg:justify-end %ul.flex.flex-wrap.justify-start.gap-4.text-xs.lg:justify-end
%li %li

View File

@ -4,7 +4,7 @@
Forum Forum
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => main_app.member_path(current_member), :role => "menuitem"} %a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => main_app.member_path(current_member), :role => "menuitem"}
Profile Profile
- if current_member.admin? - unless Rails.env.production?
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => merged.pages_path(), :role => "menuitem"} %a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => merged.pages_path(), :role => "menuitem"}
CMS CMS
= form_tag( main_app.destroy_member_session_path , {method: :delete } ) do = form_tag( main_app.destroy_member_session_path , {method: :delete } ) do