habitica-self-host/views/options/social/index.jade

96 lines
3.8 KiB
Text
Raw Normal View History

// FIXME note, due to https://github.com/angular-ui/bootstrap/issues/783 we can't use nested angular-bootstrap tabs
// Subscribe to that ticket & change this when they fix
include ./challenges.jade
include ./hall.jade
script(type='text/ng-template', id='partials/options.social.tavern.html')
include ./tavern
script(type='text/ng-template', id='partials/options.social.party.html')
div(ng-show='group._id')
include ./group
div(ng-hide='group._id')
div(ng-show='user.invitations.party.id')
2014-01-23 08:45:34 +00:00
h2=env.t('invitedTo') + '{{user.invitations.party.name}}'
2014-01-22 22:43:58 +00:00
a.btn.btn-success(data-type='party', ng-click='join(user.invitations.party)')=env.t('accept')
a.btn.btn-danger(ng-click='reject()')=env.t('reject')
div(ng-hide='user.invitations.party.id')
2014-01-22 22:43:58 +00:00
h2=env.t('createAParty')
p
2014-01-22 22:43:58 +00:00
=env.t('noPartyText')
pre.prettyprint.
{{user.id}}
include ./create-group
script(type='text/ng-template', id='partials/options.social.guilds.public.html')
div(ng-repeat='invitation in user.invitations.guilds')
2014-01-22 22:43:58 +00:00
h3=env.t('invitedTo') + '{{invitation.name}}'
a.btn.btn-success(data-type='guild', ng-click='join(invitation)')=env.t('accept')
a.btn.btn-danger(ng-click='reject(invitation)')=env.t('reject')
// Public Groups
.col-md-3
input.form-control(type='text',ng-model='guildSearch', placeholder=env.t('search'))
table.table.table-striped
tr(ng-repeat='group in groups.public | filter:guildSearch')
td
ul.pull-right.challenge-accordion-header-specs
li='{{group.memberCount}} ' + env.t('members')
li
// join / leave
a.btn.btn-small.btn-danger(ng-show='group._isMember', ng-click='clickLeave(group, $event)')
span.glyphicon.glyphicon-ban-circle
2014-01-22 22:43:58 +00:00
=env.t('leave')
a.btn.btn-small.btn-success(ng-hide='group._isMember', ng-click='join(group)')
span.glyphicon.glyphicon-ok
2014-01-22 22:43:58 +00:00
=env.t('join')
h4 {{group.name}}
p {{group.description}}
script(type='text/ng-template', id='partials/options.social.guilds.detail.html')
include ./group
script(type='text/ng-template', id='partials/options.social.guilds.create.html')
include ./create-group
script(type='text/ng-template', id='partials/options.social.guilds.html')
ul.nav.nav-tabs
li(ng-class="{ active: $state.includes('options.social.guilds.public') }")
a(ui-sref='options.social.guilds.public')
2014-01-22 22:43:58 +00:00
=env.t('publicGuilds')
li(ng-class="{ active: $stateParams.gid == group._id }", ng-repeat='group in groups.guilds')
a(ui-sref="options.social.guilds.detail({gid:group._id})")
| {{group.name}}
li(ng-class="{ active: $state.includes('options.social.guilds.create') }")
a(ui-sref='options.social.guilds.create')
2014-01-22 22:43:58 +00:00
=env.t('createGuild')
.tab-content
.tab-pane.active
div(ui-view)
script(type='text/ng-template', id='partials/options.social.html')
ul.nav.nav-tabs
li(ng-class="{ active: $state.includes('options.social.tavern') }")
a(ui-sref='options.social.tavern')
span.glyphicon.glyphicon-eye-close
2014-01-22 22:43:58 +00:00
=env.t('tavern')
li(ng-class="{ active: $state.includes('options.social.party') }")
a(ui-sref='options.social.party')
2014-01-22 22:43:58 +00:00
=env.t('party')
li(ng-class="{ active: $state.includes('options.social.guilds') }")
a(ui-sref='options.social.guilds')
2014-01-22 22:43:58 +00:00
=env.t('guilds')
li(ng-class="{ active: $state.includes('options.social.challenges') }")
a(ui-sref='options.social.challenges')
span.glyphicon.glyphicon-bullhorn
2014-01-22 22:43:58 +00:00
=env.t('challenges')
li(ng-class="{ active: $state.includes('options.social.hall') }")
a(ui-sref='options.social.hall')
span.glyphicon.glyphicon-flag
2014-01-22 22:43:58 +00:00
=env.t('hall')
.tab-content
.tab-pane.active
2014-01-22 22:43:58 +00:00
div(ui-view)