Skip to content
This repository has been archived by the owner on Aug 14, 2018. It is now read-only.

Commit

Permalink
feat(displaystats): Update landingstat entry form
Browse files Browse the repository at this point in the history
Updates the landingstat entry form to allow user to choose to display
or not display a landingstat
  • Loading branch information
toddseller committed Aug 28, 2016
1 parent b9bd219 commit 62aefa2
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions themes/codeforpoland/views/brigade.jade
Original file line number Diff line number Diff line change
Expand Up @@ -131,28 +131,28 @@ block content
.col-sm-4.checkbox
label
input.title(id="show-title", name="show-title", type="checkbox", checked=(brigade.theme.page.title ? "checked" : undefined))
| Show Brigade Name
|   Show Brigade Name
.col-sm-4.checkbox
label
input.events(id="show-events", name="show-events", type="checkbox", checked=(brigade.theme.page.events ? "checked" : undefined))
| Show Events Pages
|   Show Events Pages
.col-sm-4.checkbox
label
input.projects(id="show-projects", name="show-projects", type="checkbox", checked=(brigade.theme.page.projects ? "checked" : undefined))
| Show Projects Pages
|   Show Projects Pages
.row
.col-sm-4.checkbox
label
input.blog(id="show-blog", name="show-blog", type="checkbox", checked=(brigade.theme.page.blog ? "checked" : undefined))
| Show Blog Pages
|   Show Blog Pages
.col-sm-4.checkbox
label
input.about(id="show-about", name="show-about", type="checkbox", checked=(brigade.theme.page.about ? "checked" : undefined))
| Show About Page
|   Show About Page
.col-sm-4.checkbox
label
input.login(id="show-login", name="show-login", type="checkbox", checked=(brigade.theme.page.login ? "checked" : undefined))
| Show Login Page
|   Show Login Page
.form-group
.col-sm-offset-3.col-sm-4
button.btn.btn.btn-primary(type='submit')
Expand Down Expand Up @@ -228,7 +228,7 @@ block content
i.static.fa.fa-pencil
i.update.hidden.fa.fa-close
label.delete-checkbox(for='sponsors-#{index}-delete')
input.hidden(type='checkbox', name='sponsors[#{index}][delete]', id='sponsors-#{index}-delete')
input.hidden(type='submit', name='sponsors[#{index}][delete]', id='sponsors-#{index}-delete')
span.btn.btn-danger(type='button')
i.fa.fa-trash
td
Expand All @@ -242,15 +242,18 @@ block content
input.form-control(name='new-sponsor[image]', id='new-sponsor-image', value='', placeholder='Sponsor image')
td
button.btn.btn-primary(type='submit') Save Changes
h3 Brigade Landing-Stats
h3 Brigade Landing Statistics
small (Max 4 Stats Displayed)
.row.row-body
table.table
thead
tr
th Image Link
th Link To
th Caption
th Stat
th Caption
th Actions
th Display
tbody
each landingstat, index in brigade.landingstats
tr
Expand All @@ -260,12 +263,12 @@ block content
td
span.static=landingstat.link
input.update.hidden.form-control(type='text', name='landingstats[#{index}][link]', id='landingstat-link-link', value='#{landingstat.link}')
td
span.static=landingstat.stat
input.update.hidden.form-control(type='text', name='landingstats[#{index}][stat]', id='landingstat-link-stat', value='#{landingstat.stat}')
td
span.static=landingstat.caption
input.update.hidden.form-control(type='text', name='landingstats[#{index}][caption]', id='landingstat-link-caption', value='#{landingstat.caption}')
td
span.static=landingstat.stat
input.update.hidden.form-control(type='text', name='landingstats[#{index}][stat]', id='landingstat-link-stat', value='#{landingstat.stat}')
td
button.edit-settings-row.btn.btn-primary(type='button')
i.static.fa.fa-pencil
Expand All @@ -274,15 +277,21 @@ block content
input.hidden(type='submit', name='landingstats[#{index}][delete]', id='landingstats-#{index}-delete')
span.btn.btn-danger(type='button')
i.fa.fa-trash
td
label(for='landingstats-#{index}-display') Yes  
input(type='radio', name='landingstats[#{index}][display]', id='landingstats-#{index}-display', value='1', checked=landingstat.display==='1')
label(for='landingstats-#{index}-not_displayed') No   
input(type='radio', name='landingstats[#{index}][display]', id='landingstats-#{index}-not_displayed', value='0', checked=landingstat.display==='0')
tr
td
input.form-control(name='new-landingstat[imglink]', id='new-landingstat-imglink', value='', placeholder='Image Link')
td
input.form-control(name='new-landingstat[link]', id='new-landingstat-link', value='', placeholder='Destination Link')
td
input.form-control(name='new-landingstat[caption]', id='new-landingstat-caption', value='', placeholder='Caption')
input.form-control(name='new-landingstat[stat]', id='new-landingstat-stat', value='', placeholder='Stat')
td
input.form-control(name='new-landingstat[stat]', id='new-landingstat-stat', value='', placeholder='Stat')
input.form-control(name='new-landingstat[caption]', id='new-landingstat-caption', value='', placeholder='Caption')
input.hidden(type='radio', name='new-landingstat[display]', value='0', checked)
td
button.btn.btn-primary(type='submit') Save Changes
.row.row-title
Expand Down

0 comments on commit 62aefa2

Please sign in to comment.