2015-03-31 16:28:57 -04:00
|
|
|
extends /templates/base
|
|
|
|
|
|
|
|
block content
|
|
|
|
|
|
|
|
div
|
2015-04-01 14:56:48 -04:00
|
|
|
button.btn.btn-sm.btn-success.create-clan-btn Create New Clan
|
2015-03-31 16:28:57 -04:00
|
|
|
span.spr.spl
|
2015-04-01 14:56:48 -04:00
|
|
|
input.create-clan-name(type='text' placeholder='New clan name')
|
2015-03-31 16:28:57 -04:00
|
|
|
br
|
|
|
|
|
|
|
|
div(role='tabpanel')
|
|
|
|
ul.nav.nav-tabs(role='tablist')
|
|
|
|
li.active(role='presentation')
|
|
|
|
a(href='#public-clans' aria-controls='public-clans', role='tab', data-toggle='tab') Public Clans
|
|
|
|
li(role='presentation')
|
|
|
|
a(href='#my-clans' aria-controls='my-clans', role='tab', data-toggle='tab') My Clans
|
|
|
|
|
|
|
|
.tab-content
|
|
|
|
.tab-pane.active#public-clans(role='tabpanel')
|
|
|
|
table.table.table-striped.table-condensed
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th Clan Name
|
|
|
|
th Members
|
|
|
|
th Owner
|
|
|
|
th
|
|
|
|
tbody
|
2015-04-01 14:56:48 -04:00
|
|
|
if publicClans.length
|
|
|
|
each clan in publicClans
|
|
|
|
tr
|
|
|
|
td
|
|
|
|
if clan.get('ownerID') === me.id
|
|
|
|
a(href="/clans/#{clan.id}", style='font-weight:bold')= clan.get('name')
|
|
|
|
else
|
|
|
|
a(href="/clans/#{clan.id}")= clan.get('name')
|
|
|
|
td= clan.get('members').length
|
|
|
|
td
|
2015-04-03 12:52:25 -04:00
|
|
|
if idNameMap && idNameMap[clan.get('ownerID')]
|
|
|
|
a(href="/user/#{clan.get('ownerID')}")= idNameMap[clan.get('ownerID')]
|
|
|
|
else
|
|
|
|
a(href="/user/#{clan.get('ownerID')}") Anoner
|
2015-04-01 14:56:48 -04:00
|
|
|
td
|
|
|
|
if myClanIDs.indexOf(clan.id) < 0
|
2015-04-01 18:24:45 -04:00
|
|
|
button.btn.btn-sm.btn-success.join-clan-btn(data-id="#{clan.id}") Join Clan
|
2015-04-01 14:56:48 -04:00
|
|
|
else if clan.get('ownerID') !== me.id
|
2015-04-01 19:00:39 -04:00
|
|
|
button.btn.btn-sm.btn-warning.leave-clan-btn(data-id="#{clan.id}") Leave Clan
|
2015-04-01 14:56:48 -04:00
|
|
|
|
2015-03-31 16:28:57 -04:00
|
|
|
.tab-pane#my-clans(role='tabpanel')
|
|
|
|
table.table.table-striped.table-condensed
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th Clan Name
|
|
|
|
th Members
|
|
|
|
th Owner
|
|
|
|
th
|
|
|
|
tbody
|
2015-04-01 14:56:48 -04:00
|
|
|
if myClans.length
|
|
|
|
each clan in myClans
|
|
|
|
tr
|
|
|
|
td
|
2015-04-01 18:24:45 -04:00
|
|
|
if clan.get('ownerID') === me.id
|
|
|
|
a(href="/clans/#{clan.id}", style='font-weight:bold')= clan.get('name')
|
|
|
|
else
|
|
|
|
a(href="/clans/#{clan.id}")= clan.get('name')
|
2015-04-01 14:56:48 -04:00
|
|
|
td= clan.get('members').length
|
|
|
|
td
|
2015-04-03 12:52:25 -04:00
|
|
|
if idNameMap && idNameMap[clan.get('ownerID')]
|
|
|
|
a(href="/user/#{clan.get('ownerID')}")= idNameMap[clan.get('ownerID')]
|
|
|
|
else
|
|
|
|
a(href="/user/#{clan.get('ownerID')}") Anoner
|
2015-04-01 14:56:48 -04:00
|
|
|
td
|
|
|
|
if clan.get('ownerID') !== me.id
|
2015-04-01 19:00:39 -04:00
|
|
|
button.btn.btn-sm.btn-warning.leave-clan-btn(data-id="#{clan.id}") Leave Clan
|