minimember arranging
This commit is contained in:
parent
cdb1637bb0
commit
ed918880fb
@ -11,12 +11,30 @@
|
|||||||
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
|
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
|
||||||
= image_tag("fb" , class: "h-10 rounded-md")
|
= image_tag("fb" , class: "h-10 rounded-md")
|
||||||
%li
|
%li
|
||||||
- if member_signed_in?
|
- unless member_signed_in?
|
||||||
.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none
|
|
||||||
=link_to current_member.email , main_app.member_path(current_member)
|
|
||||||
- else
|
|
||||||
%a.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none{"aria-label" => "Sign up", :href => main_app.member_session_path, :title => "Log in or Sign up"}
|
%a.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none{"aria-label" => "Sign up", :href => main_app.member_session_path, :title => "Log in or Sign up"}
|
||||||
Login
|
Login
|
||||||
|
- else
|
||||||
|
.inline-flex.items-stretch.rounded-md.border
|
||||||
|
.rounded-l-md.px-4.py-2.text-sm.text-gray-600.hover:bg-cyan-100.hover:text-gray-900
|
||||||
|
=link_to current_member.email , main_app.member_path(current_member)
|
||||||
|
.relative
|
||||||
|
%button.inline-flex.h-full.items-center.justify-center.rounded-r-md.border-l.border-gray-100.px-2.text-gray-600.hover:bg-cyan-400{:type => "button" , onclick: "dropdown();" }
|
||||||
|
%span.sr-only Menu
|
||||||
|
%svg.h-4.w-4{:fill => "currentColor", :viewbox => "0 0 20 20", :xmlns => "http://www.w3.org/2000/svg"}
|
||||||
|
%path{"clip-rule" => "evenodd", :d => "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", "fill-rule" => "evenodd"}
|
||||||
|
#menu-dropdown.hidden.absolute.right-0.z-10.mt-4.w-36.origin-top-right.rounded-md.border.border-gray-100.bg-white.shadow-lg{:role => "menu"}
|
||||||
|
.p-2
|
||||||
|
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => "#", :role => "menuitem"}
|
||||||
|
Forum
|
||||||
|
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => "#", :role => "menuitem"}
|
||||||
|
Profile
|
||||||
|
%form{:action => "#", :method => "POST"}
|
||||||
|
%button.flex.w-full.items-center.gap-2.rounded-lg.px-4.py-2.text-sm.text-blue-700.hover:bg-red-50{:role => "menuitem", :type => "submit"}
|
||||||
|
%svg.h-4.w-4{:fill => "none", :stroke => "currentColor", "stroke-width" => "2", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"}
|
||||||
|
%path{:d => "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16", "stroke-linecap" => "round", "stroke-linejoin" => "round"}
|
||||||
|
Sign out
|
||||||
|
|
||||||
.lg:hidden.flex.items-center.justify-between
|
.lg:hidden.flex.items-center.justify-between
|
||||||
.mr-20
|
.mr-20
|
||||||
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
|
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
|
||||||
@ -44,6 +62,7 @@
|
|||||||
%li
|
%li
|
||||||
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => link.capitalize}= link.capitalize
|
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => link.capitalize}= link.capitalize
|
||||||
:javascript
|
:javascript
|
||||||
|
var drop_hidden = true;
|
||||||
function menu_on() {
|
function menu_on() {
|
||||||
var x = document.getElementById("mobile-menu");
|
var x = document.getElementById("mobile-menu");
|
||||||
x.style.display = "block";
|
x.style.display = "block";
|
||||||
@ -52,3 +71,14 @@
|
|||||||
var x = document.getElementById("mobile-menu");
|
var x = document.getElementById("mobile-menu");
|
||||||
x.style.display = "none";
|
x.style.display = "none";
|
||||||
}
|
}
|
||||||
|
function dropdown(){
|
||||||
|
var x = document.getElementById("menu-dropdown");
|
||||||
|
if( drop_hidden == true){
|
||||||
|
x.style.display = "block";
|
||||||
|
drop_hidden = false ;
|
||||||
|
} else {
|
||||||
|
x.style.display = "none";
|
||||||
|
drop_hidden = true ;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
= form_for @member do |f|
|
.flex.flex-col
|
||||||
- if @member.errors.any?
|
= form_for @member do |f|
|
||||||
#error_explanation
|
- if @member.errors.any?
|
||||||
%h2= "#{pluralize(@member.errors.count, "error")} prohibited this member from being saved:"
|
#error_explanation
|
||||||
%ul
|
%h2= "#{pluralize(@member.errors.count, "error")} prohibited this member from being saved:"
|
||||||
- @member.errors.full_messages.each do |message|
|
%ul
|
||||||
%li= message
|
- @member.errors.full_messages.each do |message|
|
||||||
|
%li= message
|
||||||
|
|
||||||
.field
|
.field
|
||||||
= f.label :name
|
= f.label :name
|
||||||
= f.text_field :name
|
= f.text_field :name
|
||||||
.field
|
.field
|
||||||
= f.label :public
|
= f.label :public
|
||||||
= f.check_box :public
|
= f.check_box :public
|
||||||
.actions
|
.actions
|
||||||
= f.submit 'Save'
|
= f.submit 'Save'
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
%h1 Editing member
|
.flex.justify-center
|
||||||
|
.flex.flex-col
|
||||||
|
%h1 Editing member
|
||||||
|
|
||||||
= render 'form'
|
= render 'form'
|
||||||
|
|
||||||
= link_to 'Show', @member
|
= link_to 'Show', @member
|
||||||
\|
|
= link_to 'Back', members_path
|
||||||
= link_to 'Back', members_path
|
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
%h1 Listing members
|
.flex.justify-center
|
||||||
|
|
||||||
%table
|
%h1 Listing members
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th Name
|
|
||||||
%th Public
|
|
||||||
%th
|
|
||||||
%th
|
|
||||||
%th
|
|
||||||
|
|
||||||
%tbody
|
%table
|
||||||
- @members.each do |member|
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%td= member.name
|
%th Name
|
||||||
%td= member.public
|
%th Public
|
||||||
%td= link_to 'Show', member
|
%th
|
||||||
%td= link_to 'Edit', edit_member_path(member)
|
%th
|
||||||
%td= link_to 'Destroy', member, method: :delete, data: { confirm: 'Are you sure?' }
|
%th
|
||||||
|
|
||||||
%br
|
%tbody
|
||||||
|
- @members.each do |member|
|
||||||
|
%tr
|
||||||
|
%td= member.name
|
||||||
|
%td= member.public
|
||||||
|
%td= link_to 'Show', member
|
||||||
|
%td= link_to 'Edit', edit_member_path(member)
|
||||||
|
%td= link_to 'Destroy', member, method: :delete, data: { confirm: 'Are you sure?' }
|
||||||
|
|
||||||
= link_to 'New Member', new_member_path
|
%br
|
||||||
|
|
||||||
|
= link_to 'New Member', new_member_path
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
%p#notice= notice
|
.flex.justify-center
|
||||||
|
.flex.flex-col
|
||||||
|
%p
|
||||||
|
%b Name:
|
||||||
|
= @member.name
|
||||||
|
%p
|
||||||
|
%b Public:
|
||||||
|
= @member.public
|
||||||
|
|
||||||
%p
|
= link_to 'Edit', edit_member_path(@member)
|
||||||
%b Name:
|
= link_to 'Back', members_path
|
||||||
= @member.name
|
= form_tag( destroy_member_session_path , {method: :delete } ) do
|
||||||
%p
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
||||||
%b Public:
|
Sign out
|
||||||
= @member.public
|
|
||||||
|
|
||||||
= link_to 'Edit', edit_member_path(@member)
|
|
||||||
\|
|
|
||||||
= link_to 'Back', members_path
|
|
||||||
\|
|
|
||||||
= form_tag( destroy_member_session_path , {method: :delete } ) do
|
|
||||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
|
|
||||||
Sign out
|
|
||||||
|
Loading…
Reference in New Issue
Block a user