fix all differents only for all elements
This commit is contained in:
parent
8f5eacb409
commit
502f28dfd3
|
@ -200,14 +200,14 @@ public class DatabaseUtils {
|
||||||
|
|
||||||
@Cacheable("vocs")
|
@Cacheable("vocs")
|
||||||
public List<VocabularyTerm> listValuesOfVocabularyTable(final VocabularyTable table) {
|
public List<VocabularyTerm> listValuesOfVocabularyTable(final VocabularyTable table) {
|
||||||
final String sql = "select val as value, name as name from " + table;
|
final String sql = "select val as value, name as name from " + table + " order by name";
|
||||||
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(VocabularyTerm.class));
|
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(VocabularyTerm.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Cacheable("countries_for_user")
|
@Cacheable("countries_for_user")
|
||||||
public List<VocabularyTerm> listCountriesForUser(final String name) {
|
public List<VocabularyTerm> listCountriesForUser(final String name) {
|
||||||
final String sql =
|
final String sql =
|
||||||
"select uc.country as value, c.name as name from user_countries uc left outer join countries c on (c.val = uc.country) where uc.email = ?";
|
"select uc.country as value, c.name as name from user_countries uc left outer join countries c on (c.val = uc.country) where uc.email = ? order by c.name";
|
||||||
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(VocabularyTerm.class), name);
|
return jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(VocabularyTerm.class), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<div class="card-footer" ng-show="selectedOrgs.length > 0">
|
<div class="card-footer" ng-show="selectedOrgs.length > 0">
|
||||||
<button type="button" class="btn btn-sm btn-secondary" ng-click="reset()" ng-show="selectedOrgs.length > 0">reset</button>
|
<button type="button" class="btn btn-sm btn-secondary" ng-click="reset()" ng-show="selectedOrgs.length > 0">reset</button>
|
||||||
<div class="btn-group float-right" ng-show="selectedOrgs.length > 1">
|
<div class="btn-group float-right" ng-show="selectedOrgs.length > 1">
|
||||||
<button type="button" class="btn btn-sm btn-danger" ng-click="invalidateGroup()">all differents</button>
|
<button type="button" class="btn btn-sm btn-danger" ng-click="invalidateGroup()" ng-show="selectedOrgs.length == orgs.length">all differents</button>
|
||||||
<button type="button" class="btn btn-sm btn-primary" ng-click="mergeGroup()">merge</button>
|
<button type="button" class="btn btn-sm btn-primary" ng-click="mergeGroup()">merge</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue