set category for Sprachen
add Bemerkung to skill
This commit is contained in:
@@ -112,14 +112,19 @@ func mapSkills(char *models.Char) []SkillViewModel {
|
||||
skills := make([]SkillViewModel, 0, len(char.Fertigkeiten))
|
||||
|
||||
for _, skill := range char.Fertigkeiten {
|
||||
skills = append(skills, SkillViewModel{
|
||||
skl := SkillViewModel{
|
||||
Name: skill.Name,
|
||||
Category: skill.Category,
|
||||
Value: skill.Fertigkeitswert,
|
||||
Bonus: skill.Bonus,
|
||||
PracticePoints: skill.Pp,
|
||||
IsLearned: skill.Fertigkeitswert > 0,
|
||||
})
|
||||
Bemerkung: skill.Bemerkung,
|
||||
}
|
||||
if skl.Name == "Schreiben" || skl.Name == "Sprache" {
|
||||
skl.Category = "Sprache"
|
||||
}
|
||||
skills = append(skills, skl)
|
||||
}
|
||||
|
||||
return skills
|
||||
|
||||
@@ -103,6 +103,7 @@ type SkillViewModel struct {
|
||||
PracticePoints int // Praxispunkte (PP)
|
||||
Attribute1 string // Leiteigenschaft Attribut für Bonus (z.B. "St")
|
||||
IsLearned bool // Ob die Fertigkeit gelernt wurde
|
||||
Bemerkung string // Bemerkungen zur Fertigkeit
|
||||
}
|
||||
|
||||
// WeaponViewModel represents a weapon for display
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<th>PP</th>
|
||||
</tr>
|
||||
{{range .SkillsLearned}}
|
||||
<tr><td>{{.Name}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
<tr><td>{{.Name}}{{if .Bemerkung}}:<span style="font-size: smaller;">{{.Bemerkung}}</span>{{end}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<!-- BLOCK: skills_languages, TYPE: skills, MAX: 4, FILTER: language -->
|
||||
@@ -45,7 +45,7 @@
|
||||
<th>PP</th>
|
||||
</tr>
|
||||
{{range .SkillsLanguage}}
|
||||
<tr><td>{{.Name}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
<tr><td>{{.Name}}{{if .Bemerkung}}:<span style="font-size: smaller;">{{.Bemerkung}}</span>{{end}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<th>PP</th>
|
||||
</tr>
|
||||
{{range .SkillsLearned}}
|
||||
<tr><td>{{.Name}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
<tr><td>{{.Name}}{{if .Bemerkung}}:<span style="font-size: smaller;">{{.Bemerkung}}</span>{{end}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="skills-stack">
|
||||
@@ -86,7 +86,7 @@
|
||||
<th>PP</th>
|
||||
</tr>
|
||||
{{range .SkillsLanguage}}
|
||||
<tr><td>{{.Name}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
<tr><td>{{.Name}}{{if .Bemerkung}}:<span style="font-size: smaller;">{{.Bemerkung}}</span>{{end}}</td><td>{{if .Value}}+ {{.Value}}{{else}} {{end}}</td><td>{{if .PracticePoints}}{{.PracticePoints}}{{end}}</td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user