The portal in English and Turkish: a catalogue per language, a switcher at the foot of every page, landing.language, Turkish numbers and dates
Every template and handler message in internal/web goes through a JSON
catalogue under internal/web/locales/<code>/, with English as the fallback.
The language is the person's choice (a cookie set by /_lang/{code}), else
Accept-Language, else landing.language. Tests refuse a key some language
lacks, a translation with other arguments than English, and template text
left in English.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
30f7f3474a
commit
11231d8c2b
113 files changed
+8091
-1981
No files matched your search
@@ -6,10 +6,7 @@
|
||||
prices every request costs nothing, so these numbers read as limits and
|
||||
bind on nothing. Self-hosted models having no per-token price is ordinary;
|
||||
showing somebody a budget without saying so is not. */}}
|
||||
<p class="banner-warn" role="note">No model has a price, so nothing is charged and
|
||||
budgets stay at zero however much is used. Rate and token limits still apply. Set
|
||||
prices in the <code>pricing</code> block of the server configuration to make
|
||||
budgets bind.</p>
|
||||
<p class="banner-warn" role="note">{{th "quotas.unpriced"}}</p>
|
||||
{{end}}
|
||||
|
||||
{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
|
||||
@@ -20,42 +17,42 @@ budgets bind.</p>
|
||||
one opens on that branch rather than asking somebody to name it again in a
|
||||
box at the bottom. */}}
|
||||
<table class="rows quota-tree">
|
||||
<tr><th>Where</th><th class="num">Requests/min</th><th class="num">Tokens/min</th>
|
||||
<th class="num">Budget</th><th>Spent</th><th></th></tr>
|
||||
<tr><th>{{t "quotas.col.where"}}</th><th class="num">{{t "quotas.col.rpm"}}</th><th class="num">{{t "quotas.col.tpm"}}</th>
|
||||
<th class="num">{{t "quotas.col.budget"}}</th><th>{{t "quotas.col.spent"}}</th><th></th></tr>
|
||||
{{range .Rows}}
|
||||
<tr class="q-depth-{{.Indent}}{{if .Editing}} editing{{end}}">
|
||||
<td class="q-where">
|
||||
<span class="q-name">{{.Path}}</span> <span class="q-kind">{{.Scope}}</span>
|
||||
{{if .Models}}<div class="q-sub">only <code>{{.Models}}</code></div>
|
||||
{{else if .ModelsFrom}}<div class="q-sub">models limited by {{.ModelsFrom}}</div>{{end}}
|
||||
{{if .Member}}<div class="q-sub">each member here: {{.Member}}</div>{{end}}
|
||||
<span class="q-name">{{.Path}}</span> <span class="q-kind">{{t (print "quotas.kind." .Scope)}}</span>
|
||||
{{if .Models}}<div class="q-sub">{{th "quotas.only_models" .Models}}</div>
|
||||
{{else if .ModelsFrom}}<div class="q-sub">{{t "quotas.models_from" .ModelsFrom}}</div>{{end}}
|
||||
{{if .Member}}<div class="q-sub">{{t "quotas.each_member" .Member}}</div>{{end}}
|
||||
{{if .Shadowed}}
|
||||
{{/* A value that is written here and never reached. Resolution takes the
|
||||
most restrictive along the chain, so without saying so the page would
|
||||
show a number as though it applied. */}}
|
||||
<div class="q-sub q-warn">{{.Shadowed}}</div>{{end}}
|
||||
</td>
|
||||
<td class="num">{{template "quota-value" dict "Own" .RPM "Up" .RPMUp "From" .RPMFrom}}</td>
|
||||
<td class="num">{{template "quota-value" dict "Own" .TPM "Up" .TPMUp "From" .TPMFrom}}</td>
|
||||
<td class="num">{{if .Budget}}{{.Budget}}{{if .Period}}<span class="q-per">/{{.Period}}</span>{{end}}
|
||||
{{else}}{{template "quota-value" dict "Own" "" "Up" .BudgetUp "From" .BudgetFrom}}{{end}}</td>
|
||||
<td class="num">{{template "quota-value" dict "Own" .Shown.RPM "Up" .RPMUp "From" .RPMFrom}}</td>
|
||||
<td class="num">{{template "quota-value" dict "Own" .Shown.TPM "Up" .TPMUp "From" .TPMFrom}}</td>
|
||||
<td class="num">{{if .Budget}}{{.Shown.Budget}}{{if .Period}}<span class="q-per">/{{.Shown.Period}}</span>{{end}}
|
||||
{{else}}{{template "quota-value" dict "Up" .BudgetUp "From" .BudgetFrom}}{{end}}</td>
|
||||
<td class="q-spent">
|
||||
<span class="q-spend">{{.Spend}}</span>
|
||||
{{if .HasPct}}<span class="q-meter{{if ge .Percent 90}} hot{{end}}" title="{{.Percent}}% of its budget"><i style="width:{{pct .Percent 100}}%"></i></span>
|
||||
<span class="q-pct">{{.Percent}}%</span>{{end}}
|
||||
{{if .HasPct}}<span class="q-meter{{if ge .Percent 90}} hot{{end}}" title="{{t "quotas.pct_of_budget" .Percent}}"><i style="width:{{pct .Percent 100}}%"></i></span>
|
||||
<span class="q-pct">{{t "quotas.pct" .Percent}}</span>{{end}}
|
||||
</td>
|
||||
<td class="q-act">
|
||||
{{if .Editing}}<a href="/admin/quotas">close</a>
|
||||
{{else}}<a href="/admin/quotas?edit={{.Scope}}:{{.ID}}">{{if .HasAny}}change{{else}}set{{end}}</a>{{end}}
|
||||
{{if .MemberEditing}}<a href="/admin/quotas">close</a>
|
||||
{{else}}<a href="/admin/quotas?edit={{.Scope}}-member:{{.ID}}" title="A limit each member here has separately">per member</a>{{end}}
|
||||
{{if .Editing}}<a href="/admin/quotas">{{t "quotas.close"}}</a>
|
||||
{{else}}<a href="/admin/quotas?edit={{.Scope}}:{{.ID}}">{{if .HasAny}}{{t "quotas.change"}}{{else}}{{t "quotas.set"}}{{end}}</a>{{end}}
|
||||
{{if .MemberEditing}}<a href="/admin/quotas">{{t "quotas.close"}}</a>
|
||||
{{else}}<a href="/admin/quotas?edit={{.Scope}}-member:{{.ID}}" title="{{t "quotas.per_member_title"}}">{{t "quotas.per_member"}}</a>{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{if .MemberEditing}}
|
||||
<tr class="editing"><td colspan="6">
|
||||
{{template "quota-form" (dict "Scope" (printf "%s-member" .Scope) "ID" .ID "F" .MemberRaw "CSRF" $.CSRF
|
||||
"Title" (printf "Each member of %s, separately" .Crumb)
|
||||
"Note" "Every member gets this much here, counted apart from the others — a fair share rather than one pool.")}}
|
||||
"Title" (t "quotas.member_form.title" .Crumb)
|
||||
"Note" (t "quotas.member_form.note"))}}
|
||||
</td></tr>
|
||||
{{end}}
|
||||
|
||||
@@ -65,136 +62,121 @@ budgets bind.</p>
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}">
|
||||
<input type="hidden" name="scope" value="{{.Scope}}">
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
<p class="q-form-title">Quota for <strong>{{.Crumb}}</strong>, shared by everything beneath it.
|
||||
A blank field means no limit of that kind, not a limit of zero.</p>
|
||||
<p class="q-form-title">{{th "quotas.form.title" .Crumb}}</p>
|
||||
<div class="field-row">
|
||||
<label>Requests / minute
|
||||
<input type="text" name="rpm" value="{{.RPM}}" placeholder="{{if .RPMUp}}{{.RPMUp}} from {{.RPMFrom}}{{else}}none{{end}}"></label>
|
||||
<label>Tokens / minute
|
||||
<input type="text" name="tpm" value="{{.TPM}}" placeholder="{{if .TPMUp}}{{.TPMUp}} from {{.TPMFrom}}{{else}}none{{end}}"></label>
|
||||
<label>Budget
|
||||
<input type="text" name="budget" value="{{.Budget}}" placeholder="{{if .BudgetUp}}{{.BudgetUp}} from {{.BudgetFrom}}{{else}}none{{end}}"></label>
|
||||
<label class="q-period">per
|
||||
<label>{{t "quotas.form.rpm"}}
|
||||
<input type="text" name="rpm" value="{{.RPM}}" placeholder="{{if .RPMUp}}{{t "quotas.form.up_from" .RPMUp .RPMFrom}}{{else}}{{t "common.none"}}{{end}}"></label>
|
||||
<label>{{t "quotas.form.tpm"}}
|
||||
<input type="text" name="tpm" value="{{.TPM}}" placeholder="{{if .TPMUp}}{{t "quotas.form.up_from" .TPMUp .TPMFrom}}{{else}}{{t "common.none"}}{{end}}"></label>
|
||||
<label>{{t "quotas.col.budget"}}
|
||||
<input type="text" name="budget" value="{{.Budget}}" placeholder="{{if .BudgetUp}}{{t "quotas.form.up_from" .BudgetUp .BudgetFrom}}{{else}}{{t "common.none"}}{{end}}"></label>
|
||||
<label class="q-period">{{t "quotas.form.per"}}
|
||||
<select name="period">
|
||||
<option value="month"{{if eq .Period "month"}} selected{{end}}>month</option>
|
||||
<option value="day"{{if eq .Period "day"}} selected{{end}}>day</option>
|
||||
<option value="month"{{if eq .Period "month"}} selected{{end}}>{{t "quotas.per.month"}}</option>
|
||||
<option value="day"{{if eq .Period "day"}} selected{{end}}>{{t "quotas.per.day"}}</option>
|
||||
</select></label>
|
||||
</div>
|
||||
<label>Only these models <span class="opt">comma separated; blank allows all</span>
|
||||
<input type="text" name="models" value="{{.Models}}" placeholder="every model"></label>
|
||||
<label>{{t "quotas.form.models"}} <span class="opt">{{t "quotas.form.models_hint"}}</span>
|
||||
<input type="text" name="models" value="{{.Models}}" placeholder="{{t "quotas.form.every_model"}}"></label>
|
||||
<div class="q-form-actions">
|
||||
<button type="submit">Save</button>
|
||||
<a href="/admin/quotas">Cancel</a>
|
||||
<button type="submit">{{t "common.save"}}</button>
|
||||
<a href="/admin/quotas">{{t "common.cancel"}}</a>
|
||||
<button type="submit" name="clear" value="1" class="link danger"
|
||||
{{if not .HasAny}}disabled{{end}}>Remove every limit here</button>
|
||||
{{if not .HasAny}}disabled{{end}}>{{t "quotas.form.remove_all"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</td></tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</table>
|
||||
<p class="q-legend"><span class="q-up">60 ↑</span> is held by a limit set higher
|
||||
up — hover it to see where. A value set here is in normal type.</p>
|
||||
<p class="q-legend">{{th "quotas.legend"}}</p>
|
||||
{{else}}
|
||||
<p class="empty">Nothing to give a quota to yet. Make an organization on the
|
||||
<a href="/admin/users">Organizations & people</a> tab first.</p>
|
||||
<p class="empty">{{th "quotas.empty_tree"}}</p>
|
||||
{{end}}
|
||||
|
||||
<h2 id="people-limits">People</h2>
|
||||
<p class="note">A person's own limit covers everything they do, across all their
|
||||
keys, projects and the chat page. {{.Personal}}</p>
|
||||
<h2 id="people-limits">{{t "quotas.people.title"}}</h2>
|
||||
<p class="note">{{t "quotas.people.note"}} {{.Personal}}</p>
|
||||
{{if .People}}
|
||||
<table class="rows quota-tree people-limits">
|
||||
<tr><th>Person</th><th class="num">Requests/min</th><th class="num">Tokens/min</th>
|
||||
<th class="num">Budget</th><th>Spent</th><th></th></tr>
|
||||
<tr><th>{{t "quotas.col.person"}}</th><th class="num">{{t "quotas.col.rpm"}}</th><th class="num">{{t "quotas.col.tpm"}}</th>
|
||||
<th class="num">{{t "quotas.col.budget"}}</th><th>{{t "quotas.col.spent"}}</th><th></th></tr>
|
||||
{{range .People}}
|
||||
<tr{{if .Editing}} class="editing"{{end}}>
|
||||
<td class="q-where"><span class="q-name">{{.Email}}</span>
|
||||
{{if .Models}}<div class="q-sub">only <code>{{.Models}}</code></div>{{end}}</td>
|
||||
<td class="num">{{or .RPM "—"}}</td>
|
||||
<td class="num">{{or .TPM "—"}}</td>
|
||||
<td class="num">{{if .Budget}}{{.Budget}}{{if .Period}}<span class="q-per">/{{.Period}}</span>{{end}}{{else}}—{{end}}</td>
|
||||
{{if .Models}}<div class="q-sub">{{th "quotas.only_models" .Models}}</div>{{end}}</td>
|
||||
<td class="num">{{or .Shown.RPM "—"}}</td>
|
||||
<td class="num">{{or .Shown.TPM "—"}}</td>
|
||||
<td class="num">{{if .Budget}}{{.Shown.Budget}}{{if .Period}}<span class="q-per">/{{.Shown.Period}}</span>{{end}}{{else}}—{{end}}</td>
|
||||
<td class="q-spent"><span class="q-spend">{{.Spend}}</span>
|
||||
{{if .HasPct}}<span class="q-meter{{if ge .Percent 90}} hot{{end}}"><i style="width:{{pct .Percent 100}}%"></i></span>
|
||||
<span class="q-pct">{{.Percent}}%</span>{{end}}</td>
|
||||
<td class="q-act">{{if .Editing}}<a href="/admin/quotas">close</a>
|
||||
{{else}}<a href="/admin/quotas?edit=user:{{.ID}}">{{if .HasAny}}change{{else}}set{{end}}</a>{{end}}</td>
|
||||
<span class="q-pct">{{t "quotas.pct" .Percent}}</span>{{end}}</td>
|
||||
<td class="q-act">{{if .Editing}}<a href="/admin/quotas">{{t "quotas.close"}}</a>
|
||||
{{else}}<a href="/admin/quotas?edit=user:{{.ID}}">{{if .HasAny}}{{t "quotas.change"}}{{else}}{{t "quotas.set"}}{{end}}</a>{{end}}</td>
|
||||
</tr>
|
||||
{{if .Editing}}
|
||||
<tr class="editing"><td colspan="6">
|
||||
{{template "quota-form" (dict "Scope" "user" "ID" .ID "CSRF" $.CSRF
|
||||
"F" (dict "RPM" .RPM "TPM" .TPM "Budget" .Budget "Period" .Period "Models" .Models "HasAny" .HasAny)
|
||||
"Title" (printf "%s, everywhere" .Email)
|
||||
"Note" "Across every key this person holds, every project they use and the chat page.")}}
|
||||
"Title" (t "quotas.person_form.title" .Email)
|
||||
"Note" (t "quotas.person_form.note"))}}
|
||||
</td></tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</table>
|
||||
{{else}}<p class="empty">Nobody has been approved yet.</p>{{end}}
|
||||
{{else}}<p class="empty">{{t "quotas.people.empty"}}</p>{{end}}
|
||||
|
||||
{{if .HasCapacity}}
|
||||
<h2 id="capacity">Capacity</h2>
|
||||
<p class="note">What a part of the tree is guaranteed of the cluster, and the most
|
||||
it may hold: GPUs, CPU cores and memory, counted from the replicas of the models
|
||||
it owns and of those beneath it. What it holds within its guarantee is never taken
|
||||
for someone else's model; beyond it, it borrows free room and gives it back when
|
||||
asked. A model's owner is set on its card on the mirror page.</p>
|
||||
<h2 id="capacity">{{t "capacity.title"}}</h2>
|
||||
<p class="note">{{t "capacity.note"}}</p>
|
||||
{{if .Capacity}}
|
||||
<table class="rows quota-tree">
|
||||
<tr><th>Where</th><th class="num">GPUs</th><th class="num">Cores</th><th class="num">Memory GB</th><th>Set by</th><th></th></tr>
|
||||
<tr><th>{{t "quotas.col.where"}}</th><th class="num">GPUs</th><th class="num">{{t "capacity.col.cores"}}</th><th class="num">{{t "capacity.col.memory"}}</th><th>{{t "capacity.col.set_by"}}</th><th></th></tr>
|
||||
{{range .Capacity}}<tr>
|
||||
<td class="q-where"><span class="q-name">{{or .Name .Scope}}</span></td>
|
||||
<td class="num">{{or .GPUs "—"}}</td>
|
||||
<td class="num">{{or .Cores "—"}}</td>
|
||||
<td class="num">{{or .Memory "—"}}</td>
|
||||
<td class="note">{{.UpdatedBy}}</td>
|
||||
<td class="q-act"><a href="/admin/quotas?cap={{.Scope}}#capacity">change</a>
|
||||
<td class="q-act"><a href="/admin/quotas?cap={{.Scope}}#capacity">{{t "quotas.change"}}</a>
|
||||
<form method="post" action="/admin/quotas/capacity" class="inline">
|
||||
<input type="hidden" name="csrf" value="{{$.CSRF}}">
|
||||
<input type="hidden" name="scope" value="{{.Scope}}">
|
||||
<button type="submit" name="clear" value="1" class="link danger">remove</button>
|
||||
<button type="submit" name="clear" value="1" class="link danger">{{t "capacity.remove"}}</button>
|
||||
</form></td>
|
||||
</tr>{{end}}
|
||||
</table>
|
||||
<p class="q-legend">Each figure is held of guaranteed (at most the limit); — is not governed.</p>
|
||||
{{else}}<p class="empty">No capacity quotas: every model shares the cluster by its class alone.</p>{{end}}
|
||||
<p class="q-legend">{{t "capacity.legend"}}</p>
|
||||
{{else}}<p class="empty">{{t "capacity.empty"}}</p>{{end}}
|
||||
|
||||
{{if .Scopes}}
|
||||
<form method="post" action="/admin/quotas/capacity" class="q-form capacity-form">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<p class="q-form-title"><strong>{{if .CapForm.Scope}}Change{{else}}Set{{end}} a capacity quota.</strong>
|
||||
A blank field is not governed; 0 is none at all.</p>
|
||||
<label>Where
|
||||
<p class="q-form-title">{{if .CapForm.Scope}}{{th "capacity.form.title_change"}}{{else}}{{th "capacity.form.title_set"}}{{end}}</p>
|
||||
<label>{{t "quotas.col.where"}}
|
||||
<select name="scope" required>
|
||||
<option value="">choose…</option>
|
||||
<option value="">{{t "capacity.form.choose"}}</option>
|
||||
{{range .Scopes}}<option value="{{.Key}}"{{if eq .Key $.CapForm.Scope}} selected{{end}}>{{.Name}}</option>{{end}}
|
||||
</select></label>
|
||||
<div class="field-row">
|
||||
<label>Guaranteed GPUs <input type="text" name="gpus" value="{{.CapForm.GPUs}}" placeholder="—"></label>
|
||||
<label>Cores <input type="text" name="cores" value="{{.CapForm.Cores}}" placeholder="—"></label>
|
||||
<label>Memory GB <input type="text" name="memory" value="{{.CapForm.Memory}}" placeholder="—"></label>
|
||||
<label>{{t "capacity.form.g_gpus"}} <input type="text" name="gpus" value="{{.CapForm.GPUs}}" placeholder="—"></label>
|
||||
<label>{{t "capacity.col.cores"}} <input type="text" name="cores" value="{{.CapForm.Cores}}" placeholder="—"></label>
|
||||
<label>{{t "capacity.col.memory"}} <input type="text" name="memory" value="{{.CapForm.Memory}}" placeholder="—"></label>
|
||||
</div>
|
||||
<div class="field-row">
|
||||
<label>At most GPUs <input type="text" name="limit_gpus" value="{{.CapForm.LGPUs}}" placeholder="—"></label>
|
||||
<label>Cores <input type="text" name="limit_cores" value="{{.CapForm.LCores}}" placeholder="—"></label>
|
||||
<label>Memory GB <input type="text" name="limit_memory" value="{{.CapForm.LMem}}" placeholder="—"></label>
|
||||
<label>{{t "capacity.form.l_gpus"}} <input type="text" name="limit_gpus" value="{{.CapForm.LGPUs}}" placeholder="—"></label>
|
||||
<label>{{t "capacity.col.cores"}} <input type="text" name="limit_cores" value="{{.CapForm.LCores}}" placeholder="—"></label>
|
||||
<label>{{t "capacity.col.memory"}} <input type="text" name="limit_memory" value="{{.CapForm.LMem}}" placeholder="—"></label>
|
||||
</div>
|
||||
<div class="q-form-actions"><button type="submit">Save</button>
|
||||
{{if .CapForm.Scope}}<a href="/admin/quotas#capacity">Cancel</a>{{end}}</div>
|
||||
<div class="q-form-actions"><button type="submit">{{t "common.save"}}</button>
|
||||
{{if .CapForm.Scope}}<a href="/admin/quotas#capacity">{{t "common.cancel"}}</a>{{end}}</div>
|
||||
</form>
|
||||
{{else}}<p class="empty">Nothing to give a capacity quota to yet. Make an organization on the
|
||||
<a href="/admin/users">Organizations & people</a> tab first.</p>{{end}}
|
||||
{{else}}<p class="empty">{{th "capacity.empty_tree"}}</p>{{end}}
|
||||
{{end}}
|
||||
|
||||
<details class="explain">
|
||||
<summary>How limits combine</summary>
|
||||
<p>Along a branch the most restrictive value wins, so a team cannot raise what
|
||||
its organization set and a project cannot raise its team's. Only an
|
||||
organization's own limit is bounded by nothing. Model lists intersect: a
|
||||
project cannot allow a model its team withheld.</p>
|
||||
<p>Per-key limits are not set here: a key is bounded by its project, and
|
||||
putting every caller's throughput one click from an admin session is more
|
||||
than this page should do — <code>llmgw keys limits --scope key</code>.</p>
|
||||
<summary>{{t "quotas.explain.summary"}}</summary>
|
||||
<p>{{t "quotas.explain.chain"}}</p>
|
||||
<p>{{th "quotas.explain.keys"}}</p>
|
||||
</details>
|
||||
{{end}}
|
||||
|
||||
@@ -209,26 +191,26 @@ asked. A model's owner is set on its card on the mirror page.</p>
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
{{/* From a panel on the people tab: the answer comes back to that panel. */}}
|
||||
{{with .Sel}}<input type="hidden" name="tab" value="people"><input type="hidden" name="sel" value="{{.}}">{{end}}
|
||||
<p class="q-form-title"><strong>{{.Title}}</strong>. {{.Note}} A blank field means no limit of that kind.</p>
|
||||
<p class="q-form-title">{{th "quotas.qform.title" .Title .Note}}</p>
|
||||
<div class="field-row">
|
||||
<label>Requests / minute <input type="text" name="rpm" value="{{.F.RPM}}" placeholder="none"></label>
|
||||
<label>Tokens / minute <input type="text" name="tpm" value="{{.F.TPM}}" placeholder="none"></label>
|
||||
<label>Budget <input type="text" name="budget" value="{{.F.Budget}}" placeholder="none"></label>
|
||||
<label class="q-period">per
|
||||
<label>{{t "quotas.form.rpm"}} <input type="text" name="rpm" value="{{.F.RPM}}" placeholder="{{t "common.none"}}"></label>
|
||||
<label>{{t "quotas.form.tpm"}} <input type="text" name="tpm" value="{{.F.TPM}}" placeholder="{{t "common.none"}}"></label>
|
||||
<label>{{t "quotas.col.budget"}} <input type="text" name="budget" value="{{.F.Budget}}" placeholder="{{t "common.none"}}"></label>
|
||||
<label class="q-period">{{t "quotas.form.per"}}
|
||||
<select name="period">
|
||||
<option value="month"{{if eq .F.Period "month"}} selected{{end}}>month</option>
|
||||
<option value="day"{{if eq .F.Period "day"}} selected{{end}}>day</option>
|
||||
<option value="month"{{if eq .F.Period "month"}} selected{{end}}>{{t "quotas.per.month"}}</option>
|
||||
<option value="day"{{if eq .F.Period "day"}} selected{{end}}>{{t "quotas.per.day"}}</option>
|
||||
</select></label>
|
||||
</div>
|
||||
<label>Only these models <span class="opt">comma separated; blank allows all</span>
|
||||
<input type="text" name="models" value="{{.F.Models}}" placeholder="every model"></label>
|
||||
<label>{{t "quotas.form.models"}} <span class="opt">{{t "quotas.form.models_hint"}}</span>
|
||||
<input type="text" name="models" value="{{.F.Models}}" placeholder="{{t "quotas.form.every_model"}}"></label>
|
||||
<div class="q-form-actions">
|
||||
<button type="submit">Save</button>
|
||||
{{if not .Sel}}<a href="/admin/quotas">Cancel</a>{{end}}
|
||||
<button type="submit">{{t "common.save"}}</button>
|
||||
{{if not .Sel}}<a href="/admin/quotas">{{t "common.cancel"}}</a>{{end}}
|
||||
<button type="submit" name="clear" value="1" class="link danger"
|
||||
{{if not .F.HasAny}}disabled{{end}}>Remove these limits</button>
|
||||
{{if not .F.HasAny}}disabled{{end}}>{{t "quotas.qform.remove"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
{{end}}
|
||||
|
||||
{{define "quota-value"}}{{if .Own}}{{.Own}}{{else if .Up}}<span class="q-up" title="set on {{.From}}">{{.Up}} ↑</span>{{else}}<span class="q-none">—</span>{{end}}{{end}}
|
||||
{{define "quota-value"}}{{if .Own}}{{.Own}}{{else if .Up}}<span class="q-up" title="{{t "quotas.set_on" .From}}">{{.Up}} ↑</span>{{else}}<span class="q-none">—</span>{{end}}{{end}}
|
||||
Reference in new issue
Block a user