/
show.html.haml
86 lines (73 loc) · 2.6 KB
/
show.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
- if can? :manage, @session
.pull-right
= link_to "Create Session Room", new_session_room_path(@session), class: "btn btn-primary"
= link_to 'Edit', edit_world_session_path(@session.world), class: "btn"
= link_to t('.edit-members'), edit_world_session_applicants_path(@world, @session), class: "btn"
%h2= @session.title
%p= @session.world.name
%div.well
%dl
%dt GameMaster
%dd
%i.icon-user
= link_to @session.game_master.name, @session.game_master
%dt StartedAt
%dd
%i.icon-time
= @session.started_at.to_s :db
%dt FinishdAt
%dd
%i.icon-time
= @session.finished_at.to_s :db
%dt
GuideLines
- if @session.public?
%span.label.label-info
Open
- else
%span.label.label-warning
Close
%dd= @session.guidelines
%div
.well
~ markdown @session.description
%div(id="entry-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="entry-modal-label" aria-hidden="true" style="display: none;")
.modal-header
%button(type="button" class="close" data-dismiss="modal" aria-hidden="true")x
%h3#entry-modal-label
= t '.entry-session'
.modal-body
.modal-footer
%button(class="btn" data-dismiss="modal" aria-hidden="true")Close
%button(id="entry-button" class="btn btn-primary")Entry
%h3= t("general.session-rooms")
%table.table.table-striped
%tr
%th Title
%th Description
%th CreatedAt
= render @session.rooms
%ul.nav.nav-tabs
%li.active= link_to t('.comments'), "#comments", "data-toggle" => "tab"
- if @session.fix_applicant?
%li= link_to t('.participants'), "#participants", "data-toggle" => "tab"
- else
%li= link_to t('.applicants'), "#applicants", "data-toggle" => "tab"
.tab-content
#comments.tab-pane.active
#comment_error
= simple_form_for [@session, @comment], :html => {class: "well form-inline"}, :remote => true do |f|
= f.input_field :body, placeholder: "Comment", class: "span7"
= f.button :submit, class: "btn-success", id: "new_comment_submit"
#comments-container
= render @session.comments.reverse
- if @session.fix_applicant?
#participants.tab-pane
= render @session.applicants.approved
- else
#applicants.tab-pane
- if !@session.fix_applicant? && can?(:create, @applicant)
#applicant-error
= link_to t('buttons.entry-session'), new_world_session_applicant_path(@session.world, @session), role: "button", class: "btn btn-success btn-block", "data-toggle" => "modal", "data-target" => "#entry-modal"
#applicants-container
= render @session.applicants