main
input#modalRules.modal(type="checkbox")
div#rulesDiv(
role="dialog"
data-checkbox="modalRules"
)
.card
label.modal-close(for="modalRules")
a#variantNameInProblems(:href="'/#/variants/'+game.vname")
| {{ curproblem.vdisp }}
div(v-html="rulesContent")
input#modalNewprob.modal(
type="checkbox"
@change="fenFocusIfOpened($event)"
)
div#newprobDiv(
role="dialog"
data-checkbox="modalNewprob"
)
.card
label#closeNewprob.modal-close(for="modalNewprob")
fieldset
label(for="selectVariant") {{ st.tr["Variant"] }}
select#selectVariant(
v-model="curproblem.vid"
@change="changeVariant(curproblem)"
)
option(
v-for="v in [emptyVar].concat(st.variants)"
v-if="!v.noProblems"
:value="v.id"
:selected="curproblem.vid==v.id"
)
| {{ v.name }}
fieldset
input#inputFen(
type="text"
placeholder="FEN"
v-model="curproblem.fen"
@input="trySetDiagram(curproblem)"
)
#diagram(v-html="curproblem.diag")
fieldset
textarea.instructions-edit(
:placeholder="st.tr['Instructions']"
@input="adjustHeight('instructions')"
v-model="curproblem.instruction"
)
.instructions(v-html="parseHtml(curproblem.instruction)")
fieldset
textarea.solution-edit(
:placeholder="st.tr['Solution']"
@input="adjustHeight('solution')"
v-model="curproblem.solution"
)
.solution(v-html="parseHtml(curproblem.solution)")
button(@click="sendProblem()") {{ st.tr["Send"] }}
#dialog.text-center {{ st.tr[infoMsg] }}
.row(v-if="showOne")
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
#topPage
.button-group(v-if="canIedit(curproblem.uid)")
button(@click="editProblem(curproblem)") {{ st.tr["Edit"] }}
button(@click="deleteProblem(curproblem)") {{ st.tr["Delete"] }}
span.vname {{ curproblem.vdisp }}
span.uname ({{ curproblem.uname }})
button.marginleft(@click="backToList()") {{ st.tr["Back to list"] }}
button.nomargin(@click="gotoPrevNext(curproblem,1)")
| {{ st.tr["Previous_p"] }}
button.nomargin(@click="gotoPrevNext(curproblem,-1)")
| {{ st.tr["Next_p"] }}
.instructions.oneInstructions.clickable(
v-html="parseHtml(curproblem.instruction)"
@click="curproblem.showSolution=!curproblem.showSolution"
)
| {{ st.tr["Show solution"] }}
.solution(
v-show="curproblem.showSolution"
v-html="parseHtml(curproblem.solution)"
)
.row(v-else)
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
#controls
button#newProblem(@click="prepareNewProblem()")
| {{ st.tr["New problem"] }}
div#myProblems(v-if="st.user.id > 0")
label(for="checkboxMine") {{ st.tr["My problems"] }}
input#checkboxMine(
type="checkbox"
v-model="onlyMine"
)
label(for="selectVariant") {{ st.tr["Variant"] }}
select#selectVariant(v-model="selectedVar")
option(
v-for="v in [emptyVar].concat(st.variants)"
v-if="!v.noProblems"
:value="v.id"
)
| {{ v.name }}
table#tProblems
tr
th {{ st.tr["Variant"] }}
th {{ st.tr["Instructions"] }}
th {{ st.tr["Number"] }}
tr(
v-for="p in problems[onlyMine ? 'mine' : 'others']"
v-show="onlyMine || !selectedVar || p.vid == selectedVar"
@click="setHrefPid(p)"
)
td {{ p.vdisp }}
td {{ firstChars(p.instruction) }}
td {{ p.id }}
button#loadMoreBtn(
v-if="hasMore[onlyMine ? 'mine' : 'others']"
@click="loadMore(onlyMine ? 'mine' : 'others')"
)
| {{ st.tr["Load more"] }}
BaseGame(
ref="basegame"
v-if="showOne"
:game="game"
)