show profiles good
This commit is contained in:
21
Gemfile.lock
21
Gemfile.lock
@ -1,14 +1,6 @@
|
|||||||
GIT
|
GIT
|
||||||
remote: https://github.com/ruby2js/ruby2js/
|
remote: https://github.com/HubFeenixMakers/merged
|
||||||
revision: f204f4e8f14cde6e4d4c6aafc55251a8d488a78d
|
revision: accb6682675f92eed6e1c306995017b1c8da1289
|
||||||
branch: haml_fix
|
|
||||||
specs:
|
|
||||||
ruby2js (5.0.1)
|
|
||||||
parser
|
|
||||||
regexp_parser (~> 2.1.1)
|
|
||||||
|
|
||||||
PATH
|
|
||||||
remote: ../merged
|
|
||||||
specs:
|
specs:
|
||||||
merged (0.1.0)
|
merged (0.1.0)
|
||||||
active_hash
|
active_hash
|
||||||
@ -19,6 +11,15 @@ PATH
|
|||||||
redcarpet
|
redcarpet
|
||||||
ruby2js (~> 5.0, >= 5.0.1)
|
ruby2js (~> 5.0, >= 5.0.1)
|
||||||
|
|
||||||
|
GIT
|
||||||
|
remote: https://github.com/ruby2js/ruby2js/
|
||||||
|
revision: f204f4e8f14cde6e4d4c6aafc55251a8d488a78d
|
||||||
|
branch: haml_fix
|
||||||
|
specs:
|
||||||
|
ruby2js (5.0.1)
|
||||||
|
parser
|
||||||
|
regexp_parser (~> 2.1.1)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
@ -13,12 +13,14 @@
|
|||||||
%ul.space-y-6.px-20
|
%ul.space-y-6.px-20
|
||||||
- main_menu.each do |link , text|
|
- main_menu.each do |link , text|
|
||||||
%li
|
%li
|
||||||
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => text }= text
|
%a.w-full.h-full.block.tracking-wide.text-xl.p-2.rounded-lg.hover:bg-cyan-200{ :href => link , :title => text}
|
||||||
|
= text
|
||||||
%li
|
%li
|
||||||
%hr
|
%hr
|
||||||
- mobile_menu.each do |link , text|
|
- mobile_menu.each do |link , text|
|
||||||
%li
|
%li
|
||||||
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => text }= text
|
%a.w-full.h-full.block.tracking-wide.text-xl.p-2.rounded-lg.hover:bg-cyan-200{ :href => link , :title => text}
|
||||||
|
= text
|
||||||
:javascript
|
:javascript
|
||||||
var drop_hidden = true;
|
var drop_hidden = true;
|
||||||
function menu_on() {
|
function menu_on() {
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
= render "profile_card" , profile: profile
|
||||||
|
.flex.justify-between.mt-4
|
||||||
|
= link_to edit_profile_path(profile) do
|
||||||
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
|
Edit
|
||||||
|
= form_tag( profile_path(profile.id) , {method: :delete } ) do
|
||||||
|
%button.bg-red-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
||||||
|
Delete Profile
|
||||||
|
@ -1,21 +1,6 @@
|
|||||||
.flex.flex-col.justify-center
|
= render "profile_card" , profile: profile
|
||||||
=link_to profile_path(profile) do
|
|
||||||
.px-4.py-4.text-center.bg-gray-200
|
|
||||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
|
||||||
Member Profile
|
|
||||||
.flex.mt-6.py-4.flex-col.max-w-screen-lg.overflow-hidden.bg-white.border.rounded.shadow-sm
|
|
||||||
.relative
|
|
||||||
-if profile.picture_url
|
|
||||||
= image_tag profile.picture_url, class: "object-cover w-full h-60"
|
|
||||||
-else
|
|
||||||
No picture
|
|
||||||
%h5.m-4.text-3xl.font-bold.text-center
|
|
||||||
= profile.name
|
|
||||||
.mb-8.text-gray-800.text-center
|
|
||||||
.prose= markdown(profile.bio)
|
|
||||||
|
|
||||||
|
.flex.justify-between.mt-4
|
||||||
.flex.justify-between
|
|
||||||
= link_to edit_profile_path(profile) do
|
= link_to edit_profile_path(profile) do
|
||||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
Edit
|
Edit
|
||||||
|
15
app/views/members/_profile_card.haml
Normal file
15
app/views/members/_profile_card.haml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.flex.flex-col.justify-center
|
||||||
|
=link_to profile_path(profile) do
|
||||||
|
.px-4.py-4.text-center.bg-gray-200
|
||||||
|
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||||
|
#{profile.Kind} Profile
|
||||||
|
.flex.mt-6.py-4.flex-col.max-w-screen-lg.overflow-hidden.bg-white.border.rounded.shadow-sm
|
||||||
|
.relative
|
||||||
|
-if profile.picture_url
|
||||||
|
= image_tag profile.picture_url, class: "object-cover w-full h-60"
|
||||||
|
-else
|
||||||
|
No picture
|
||||||
|
%h5.m-4.text-3xl.font-bold.text-center
|
||||||
|
= profile.name
|
||||||
|
.mb-8.text-gray-800.text-center
|
||||||
|
.prose= markdown(profile.bio)
|
@ -1,10 +1,20 @@
|
|||||||
-if event = profile.events.length >0
|
= render "profile_card" , profile: profile
|
||||||
%div
|
|
||||||
=link_to profile.events.first.name , event_path(profile.events.first) , class: "underline"
|
.flex.justify-between.mt-4
|
||||||
= link_to edit_event_path(profile.events.first) do
|
= link_to edit_profile_path(profile) do
|
||||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
Edit
|
Edit
|
||||||
-else
|
= form_tag( profile_path(profile.id) , {method: :delete } ) do
|
||||||
= link_to new_event_path(profile: profile.kind) do
|
%button.bg-red-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
||||||
|
Delete Profile
|
||||||
|
|
||||||
|
-if event = profile.events.length >0
|
||||||
|
%div
|
||||||
|
=link_to profile.events.first.name , event_path(profile.events.first) , class: "underline"
|
||||||
|
= link_to edit_event_path(profile.events.first) do
|
||||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
New #{profile.Kind} Event
|
Edit
|
||||||
|
-else
|
||||||
|
= link_to new_event_path(profile: profile.kind) do
|
||||||
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
|
New #{profile.Kind} Event
|
||||||
|
@ -24,11 +24,12 @@
|
|||||||
%div= entity.name
|
%div= entity.name
|
||||||
%div= entity.value
|
%div= entity.value
|
||||||
%div
|
%div
|
||||||
If you are an artist click
|
- unless @member.artist_profile
|
||||||
=link_to "here" , new_profile_path(kind: :artist) , class: "underline"
|
If you are an artist at Hub Feenix, click
|
||||||
%br
|
=link_to "here" , new_profile_path(kind: :artist) , class: "underline"
|
||||||
Or a teacher, click
|
- unless @member.teacher_profile
|
||||||
=link_to "here" , new_profile_path(kind: :teacher) , class: "underline"
|
If you teach at Hub Feenix, click
|
||||||
|
=link_to "here" , new_profile_path(kind: :teacher) , class: "underline"
|
||||||
|
|
||||||
- unless @member.member_profile
|
- unless @member.member_profile
|
||||||
%div
|
%div
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.flex.justify-center
|
.flex.justify-center
|
||||||
.column.max-w-lg
|
.column{class: "w-10/12 md:w-8/12 lg:w-5/12 xl:w-4/12"}
|
||||||
.text-xl.m-4
|
.text-xl.m-4
|
||||||
Edit your
|
Edit your
|
||||||
=@profile.Kind
|
=@profile.Kind
|
||||||
|
Reference in New Issue
Block a user