app/views/events/show.html.slim
- title @event.title
article.event ng-init=init_event(@event)
header
.actions.pull-right.hidden-phone ng-cloak="" ng-controller="FollowsCtrl" ng-init="init(#{event_follow_info(@event)})"
a.btn ng-href='{{href}}' ng-click='follow()' ng-class='{disabled: disabled}' data-toggle="tooltip" title='{{title}}'
i.icon-star
| {{labels[followed]}}
a.social-count href=group_event_followers_path(@event) {{count}}
h1 = link_to @event.title, event_path(@event), class: 'event-title'
h2 = time_merge(@event)
= render 'events/menu'
.row
.span8
- if @event.tickets_quantity != 0
.event-tickets ng-controller='OrdersCtrl'
.table-responsive
table.table ng-show='tickets'
thead
tr
th = t('activerecord.attributes.event_ticket.name')
th style="min-width: 28px;" = t('activerecord.attributes.event_ticket.price')
th style="min-width: 50px;" 数量
tbody ng-init=init_tickets(@event) ng-cloak=""
tr ng-repeat="ticket in tickets"
td
|{{ticket.name}}
.muted
|{{ticket.description}}
td
|{{ticket.price | money }}
td
select.span1 ng-model='ticket.quantity' = options_for_select(0..10)
.signup.clearfix ng-show="errors['user_session'] && user_form=='register'"
div ng-cloak=""
p.text-warning
|请先注册,或者
a href='javascript:void(0)' ng-click='use_login_form()' 登录
label.control-label for="user_login" 用户名
input.input-large id='user_login' ng-model="user_login" type="text"
label.control-label for="user_email" Email
input.input-large id='user_email' ng-model="user_email" type="text"
label.control-label for="user_password" 密码
input.input-large id='user_password' ng-model="user_password" type="password"
a.btn.btn-info.span1.pull-right ng-click='signup()' 注册
.login.clearfix ng-show="errors['user_session'] && user_form=='login'"
div ng-cloak=""
p.text-warning
|请先登录,或者
a href='javascript:void(0)' ng-click='use_register_form()' 注册
label.control-label for="email" Email
input.input-large id='email' ng-model="email" type="text"
label.control-label for="password" 密码
input.input-large id='password' ng-model="password" type="password"
a.btn.btn-info.span1.pull-right ng-cloak="" ng-click='login()' 登录
.payment.clearfix
p.text-warning ng-show="errors['tickets']" ng-cloak="" 请先选择门票数量。
div ng-show="errors['user_info']" ng-cloak=""
p.text-warning 请完善用户信息,完成订单后您的手机将收到签到码
label.control-label for="user_name" 姓名
input.input-large name='user_name' ng-model="user.name" type="text"
label.control-label for="user_phone" 手机
input.input-large name='user_phone' ng-model="user.phone" type="text"
div ng-show="errors['invoice_info']" ng-cloak=""
label.muted.control-label
input type="checkbox" style="margin-top:0px;" checked="checked" ng-model="user_wants_invoice"
| 需要提供发票
.invoice-info ng-show="user_wants_invoice"
label.control-label for="invoice_title" 发票抬头
input.input-xlarge name='invoice_title' ng-model="invoice_title" type="text"
label.control-label for="address" 收货地址
.city-group
select.city-select.span2.margin-right ng-model="province" ng-init="province=''"
option value='' --省份--
= options_for_select(ChinaCity.list)
select.city-select.span2.margin-right ng-model="city" ng-init="city=''"
option value='' --城市--
select.city-select.span2 ng-model="district" ng-init="district=''"
option value='' --地区--
input.span5 name='address' ng-model="address" type="text" placeholder='详细地址'
.shipping_info
input.input-medium.margin-right name='shipping_name' ng-model="shipping_name" type="text" placeholder='收货人姓名'
input.input-medium name='shipping_phone' ng-model="shipping_phone" type="text" placeholder='收货人联系电话'
a.btn.btn-info.span1.pull-right ng-hide="status || errors['user_session']" ng-disabled='disabled' ng-click='create()' ng-cloak="" ng-init={labels: t('views.order.labels')}.to_ng_init
|{{labels[disabled]}}
- if current_user && current_user.ordered?(@event)
= link_to t('labels.my_orders'), user_orders_path(event_id: @event.id), class: 'btn pull-right', 'ng-hide' => 'status', 'ng-cloak'=>''
p.text-info ng-show="status=='paid'" ng-cloak="" 您已经提交了订单,订单号为 {{number}},此订单为免费订单,不需要支付,谢谢。
.pending-order-tip ng-show='pay_url' ng-cloak=""
p.text-info 您已经提交了订单,订单号为 {{number}},请尽快支付。
p.muted 超过三天未支付的订单会自动取消。
a.btn.btn-warning.pull-right ng-href='{{pay_url}}' target='_blank' 使用支付宝支付
- else
.sold-out.alert.alert-alert
| 名额已满,停止报名 :(
.event-body
== @event.content_html
- if @event.show_summary?
.event-summary
h2 = build_summary_title(@event)
== build_summary_content(@event)
/= render 'topics/index'
.span4
.actions
.event-sidebar
ul.unstyled
li
i.icon-calendar
= time_merge(@event)
li
i.icon-map-marker
= @event.location
.event-map == @event.location_guide_html
- if baidu_map_enabled?
#baiduMap data-location=@event.location
hr
p
span.label.label-important 联系人
span.event-contact
= link_to @event.user.login, user_path(@event.user)
= @event.user.phone
div
hr
h3
|已参加用户
span.label.amount = @event.ordered_users.size
ul.event-participants
- @event.ordered_users.recent(10).each do |user|
li
.popover.top id="participant-#{user.id}"
.arrow
h3.popover-title
.user-title
= user.login
.popover-content
ul.user-info.unstyled.inline.muted
li = user.profile.try(:website)
li = user.created_at.to_date.to_s(:db)
.user-body = raw user.profile.try(:bio_html)
= link_to 'javascript:void(0)', rel: "popover", data: { target: "#participant-#{user.id}", trigger: 'hover', placement: 'left' } do
= image_tag user.gravatar_url(:size => 40), :class => 'gravatar'
- if @event.sibling_events.any?
.sibling-events
.event-sidebar
i.icon-list
= t('views.history.title')
ul
- @event.sibling_events.each do |sibling_event|
li
= link_to history_url_text(sibling_event), sibling_event