Skip to content

Commit

Permalink
Show labels for points name even if there is no community setting. Re…
Browse files Browse the repository at this point in the history
…solves #1
  • Loading branch information
mbosecke committed Oct 16, 2016
1 parent b8fc0c4 commit dea9816
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ private void addCommonMavObjects(ModelAndView mav, String communityName, String
mav.addObject("communityUserModels", communityUserService.findMemberships());
mav.addObject("communityUserModel", communityUserModel);
mav.addObject("hasOwnerAccess", communityPermissions.hasAccess(communityName, AccessLevel.OWNER));
mav.addObject("pointsPlural", communityUserModel.getCommunityModel().getSetting("points.plural"));
String pointsPlural = communityUserModel.getCommunityModel().getSetting("points.plural");
mav.addObject("pointsPlural", pointsPlural == null? "Points" : pointsPlural);
mav.addObject("activeTab", activeTab);
}
}
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spring:
security:
oauth2:
client:
clientId: hlwwxhj8cgqapba47blso4hwuh3amv0
clientSecret: 5m8x6gpddwcweewry4tbdowpxbqddrh
clientId: hk8e73z9j2d3xplierlk0e7mgo3bw23
clientSecret: jky4h8bo4bd471hluzmhejceg3111s0
accessTokenUri: https://api.twitch.tv/kraken/oauth2/token
userAuthorizationUri: https://api.twitch.tv/kraken/oauth2/authorize
tokenName: oauth_token
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h2 id="points">Points</h2>
{{ label('pointsPlural', 'Name of points') }}
<div class="col-sm-9">
<input type="text" class="form-control" name="pointsPlural" id="pointsPlural"
value="{{pointsPlural | default('points')}}">
value="{{pointsPlural | default('Points')}}">
{{ fieldErrors(getFieldErrors('pointsForm', 'pointsPlural')) }}
<span class="help-block">This affects leaderboard and bot messages but not the <code>!points</code> command; use an alias for a custom command.</span>
</div>
Expand Down

0 comments on commit dea9816

Please sign in to comment.