Skip to content

Commit

Permalink
参加表の基礎実装
Browse files Browse the repository at this point in the history
  • Loading branch information
oshiro3 committed May 1, 2024
1 parent 5af35ec commit 02cf92a
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/controllers/profiles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class ProfilesController < ApplicationController
include Secured

before_action :set_conference
before_action :set_current_profile, only: [:edit, :update, :destroy, :checkin]
before_action :set_current_profile, only: [:edit, :update, :destroy, :checkin, :entry_sheet]
skip_before_action :logged_in_using_omniauth?, only: [:new]
before_action :is_admin?, :find_profile, only: [:destroy_id, :set_role]

Expand Down Expand Up @@ -114,6 +114,8 @@ def checkin
end
end

def entry_sheet;end

helper_method :profile_url

private
Expand Down
39 changes: 39 additions & 0 deletions app/javascript/stylesheets/_entry_sheet.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.a8-container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
height: 100vh;
width: 100vw;
}

.a8 {
border: 1px solid black;
display: flex;
justify-content: flex-start;
flex-direction: column;
align-items: center;
.logo-image{
margin-top: 3rem;
}
.profile {
display: inherit;
margin-top: 2rem;
flex-direction: row;
.qrcode{
display: inherit;
margin-right: 2rem;
flex-direction: column;
}
.detail{
display: inherit;
margin-left: 2rem;
flex-direction: column;
}
}
}

@media print {
.a8-container {
page-break-after: always; // コンテンツの後に改ページ
}
}
3 changes: 2 additions & 1 deletion app/javascript/stylesheets/cndt2023.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
@import "./_speaker_dashboard.scss";
@import "./_event.scss";
@import "./_checkin.scss";
@import "./_entry_sheet.scss";
@import "./_copy.scss";
@import "./_contents.scss";
@import "./cndt2023/_cndt2023.scss";
// Import custom utilities
@import "./cndt2023/_utilities.scss";
@import "./cndt2023/_utilities.scss";
15 changes: 15 additions & 0 deletions app/views/profiles/entry_sheet.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>EntrySheet</title>
</head>
<body>
<div class="a8-container">
<%= render 'profiles/partial_entry_sheet/up_left_cell'%>
<div class="a8">Content 2.1</div>
<div class="a8">Content 3</div>
<div class="a8">Content 4</div>
</div>
</body>
</html>

16 changes: 16 additions & 0 deletions app/views/profiles/partial_entry_sheet/_up_left_cell.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="a8">
<div class="logo-image">
<%= image_tag "cndt2023/header_logo.png", class: "img-fluid header_logo" %>
</div>
<div class="profile">
<div class="qrcode">
<img src=<%= "data:image/png;base64,#{@profile.qrcode_image}" %> />
<%= h("受付用QRコード") %>
</div>
<div class="detail">
<%= h("<Attendee>") %>
<%= image_tag @profile.public_profile.avatar_url(:small) %>
Name: <%= @profile.public_profile.nickname %>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
get 'profiles', to: 'profiles#edit'
get 'profiles/edit', to: 'profiles#edit'
get 'profiles/checkin', to: 'profiles#checkin'
get 'profiles/entry_sheet' => 'profiles#entry_sheet'
resources :public_profiles


Expand Down

0 comments on commit 02cf92a

Please sign in to comment.