diff --git a/controllers/player_controller.go b/controllers/player_controller.go index dd3e34e..205cf0c 100644 --- a/controllers/player_controller.go +++ b/controllers/player_controller.go @@ -43,11 +43,10 @@ func GetPlayersByClanHTML(c *gin.Context) { return } playerItem := string(file) - //player_item = strings.Replace(player_item, "PLAYERNAME", player.Name, 1) var htmlOptions string for _, player := range players { - htmlOptions += fmt.Sprintf(playerItem, player.Name) + htmlOptions += fmt.Sprintf(playerItem, player.Name, player.ID) } c.Header("Content-Type", "text/html") diff --git a/main.go b/main.go index a6e8644..fc7b885 100644 --- a/main.go +++ b/main.go @@ -39,6 +39,7 @@ func main() { "./templates/modals/add_clan.html", "./templates/modals/edit_clan.html", "./templates/modals/add_player.html", + "./templates/modals/delete_player.html", "./templates/components/header.html", } tmpl, err := template.ParseFiles(files...) diff --git a/static/index.js b/static/index.js index 4f5c90a..513c65a 100644 --- a/static/index.js +++ b/static/index.js @@ -5,7 +5,9 @@ function setupClanButtons(dropdownId, delBtnId, editBtnId) { dropdown.addEventListener('change', function () { deleteButton.disabled = !this.value; + deleteButton.classList.toggle("bg-secondary-subtle"); editButton.disabled = !this.value; + editButton.classList.toggle("bg-secondary-subtle"); }); } diff --git a/templates/components/home_clan_bar.html b/templates/components/home_clan_bar.html index 2719ac6..7a71974 100644 --- a/templates/components/home_clan_bar.html +++ b/templates/components/home_clan_bar.html @@ -10,10 +10,10 @@ - - - + + + + + + + + + +{{ end }} \ No newline at end of file diff --git a/templates/player_list_item.html b/templates/player_list_item.html index 8bec93d..3ba6d84 100644 --- a/templates/player_list_item.html +++ b/templates/player_list_item.html @@ -5,7 +5,11 @@ %s \ No newline at end of file