Commit d38c96e5 authored by Matija Obreza's avatar Matija Obreza

Blurbs

- Article slugs updated
- Request and model parameters renamed
- Translations renamed
parent badc9df4
...@@ -113,31 +113,31 @@ public class OrganizationController extends ApiBaseController { ...@@ -113,31 +113,31 @@ public class OrganizationController extends ApiBaseController {
} }
/** /**
* Get organization blurp * Get organization blurb
* *
* @return * @return
* @throws AuthorizationException * @throws AuthorizationException
*/ */
@RequestMapping(value = "/{shortName}/blurp/{language}", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE }) @RequestMapping(value = "/{shortName}/blurb/{language}", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })
public @ResponseBody public @ResponseBody
String getBlurp(@PathVariable("shortName") String shortName, @PathVariable("language") String language) throws AuthorizationException { String getBlurb(@PathVariable("shortName") String shortName, @PathVariable("language") String language) throws AuthorizationException {
PGRFANetwork org = networkService.getNetwork(shortName); PGRFANetwork org = networkService.getNetwork(shortName);
Article article = networkService.getBlurb(org, new Locale(language)); Article article = networkService.getBlurb(org, new Locale(language));
return article == null ? null : article.getBody(); return article == null ? null : article.getBody();
} }
/** /**
* Update blurp * Update blurb
* *
* @return * @return
* @throws AuthorizationException * @throws AuthorizationException
* @throws CRMException * @throws CRMException
*/ */
@RequestMapping(value = "/{shortName}/blurp", method = RequestMethod.PUT, produces = { MediaType.APPLICATION_JSON_VALUE }) @RequestMapping(value = "/{shortName}/blurb", method = RequestMethod.PUT, produces = { MediaType.APPLICATION_JSON_VALUE })
public @ResponseBody public @ResponseBody
Article updateBlurp(@PathVariable("shortName") String shortName, @RequestBody OrganizationBlurpJson blurp) throws AuthorizationException, CRMException { Article updateBlurb(@PathVariable("shortName") String shortName, @RequestBody OrganizationBlurbJson blurb) throws AuthorizationException, CRMException {
PGRFANetwork org = networkService.getNetwork(shortName); PGRFANetwork org = networkService.getNetwork(shortName);
return networkService.updateAbout(org, blurp.blurp, blurp.summary, blurp.getLocale()); return networkService.updateAbout(org, blurb.blurb, blurb.summary, blurb.getLocale());
} }
/** /**
...@@ -208,9 +208,9 @@ public class OrganizationController extends ApiBaseController { ...@@ -208,9 +208,9 @@ public class OrganizationController extends ApiBaseController {
return networkService.setInstitutes(network, instituteList); return networkService.setInstitutes(network, instituteList);
} }
public static class OrganizationBlurpJson { public static class OrganizationBlurbJson {
public String summary; public String summary;
public String blurp; public String blurb;
public String locale; public String locale;
public Locale getLocale() { public Locale getLocale() {
......
...@@ -91,7 +91,7 @@ public class CountryController extends BaseController { ...@@ -91,7 +91,7 @@ public class CountryController extends BaseController {
model.addAttribute("region", geoRegionService.getRegion(country)); model.addAttribute("region", geoRegionService.getRegion(country));
model.addAttribute("itpgrfa", geoService.getITPGRFAStatus(country)); model.addAttribute("itpgrfa", geoService.getITPGRFAStatus(country));
model.addAttribute("blurp", contentService.getArticle(country, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(country, ContentService.ENTITY_BLURB_SLUG, getLocale()));
// All institutes // All institutes
model.addAttribute("faoInstitutes", instituteService.listByCountry(country)); model.addAttribute("faoInstitutes", instituteService.listByCountry(country));
...@@ -143,14 +143,14 @@ public class CountryController extends BaseController { ...@@ -143,14 +143,14 @@ public class CountryController extends BaseController {
@PreAuthorize("hasRole('ADMINISTRATOR')") @PreAuthorize("hasRole('ADMINISTRATOR')")
@RequestMapping("/{country}/update") @RequestMapping("/{country}/update")
public String update(ModelMap model, @PathVariable(value = "country") String countryStr, @RequestParam("blurp") String blurp) throws CRMException { public String update(ModelMap model, @PathVariable(value = "country") String countryStr, @RequestParam("blurb") String blurb) throws CRMException {
LOG.debug("Editing country {}", countryStr); LOG.debug("Editing country {}", countryStr);
final Country country = geoService.getCountry(countryStr); final Country country = geoService.getCountry(countryStr);
if (country == null) { if (country == null) {
throw new NotFoundElement(); throw new NotFoundElement();
} }
geoService.updateBlurp(country, blurp, getLocale()); geoService.updateBlurb(country, blurb, getLocale());
return "redirect:/geo/" + country.getCode3(); return "redirect:/geo/" + country.getCode3();
} }
......
...@@ -136,7 +136,7 @@ public class CropController extends BaseController { ...@@ -136,7 +136,7 @@ public class CropController extends BaseController {
model.addAttribute("jsonFilter", appliedFilters.toString()); model.addAttribute("jsonFilter", appliedFilters.toString());
model.addAttribute("cropRules", cropService.getCropRules(crop)); model.addAttribute("cropRules", cropService.getCropRules(crop));
model.addAttribute("cropTaxonomies", cropService.getCropTaxonomies(crop, new PageRequest(0, 21, new Sort("taxonomy.genus", "taxonomy.species")))); model.addAttribute("cropTaxonomies", cropService.getCropTaxonomies(crop, new PageRequest(0, 21, new Sort("taxonomy.genus", "taxonomy.species"))));
model.addAttribute("blurp", contentService.getArticle(crop, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(crop, ContentService.ENTITY_BLURB_SLUG, getLocale()));
// model.addAttribute("statsGenus", // model.addAttribute("statsGenus",
// elasticService.termStatisticsAuto(appliedFilters, // elasticService.termStatisticsAuto(appliedFilters,
...@@ -185,7 +185,7 @@ public class CropController extends BaseController { ...@@ -185,7 +185,7 @@ public class CropController extends BaseController {
@RequestMapping(value = "/{shortName}/update", method = RequestMethod.POST) @RequestMapping(value = "/{shortName}/update", method = RequestMethod.POST)
public String update(ModelMap model, @PathVariable(value = "shortName") String shortName, @RequestParam(value = "cropName", required = false) String cropName, public String update(ModelMap model, @PathVariable(value = "shortName") String shortName, @RequestParam(value = "cropName", required = false) String cropName,
@RequestParam("blurp") String aboutBody, @RequestParam(value = "summary", required = false) String summary) throws CRMException { @RequestParam("blurb") String aboutBody, @RequestParam(value = "summary", required = false) String summary) throws CRMException {
Crop crop = cropService.getCrop(shortName); Crop crop = cropService.getCrop(shortName);
if (crop == null) { if (crop == null) {
...@@ -194,7 +194,7 @@ public class CropController extends BaseController { ...@@ -194,7 +194,7 @@ public class CropController extends BaseController {
} }
LOG.debug("Updating crop blurb {}", shortName); LOG.debug("Updating crop blurb {}", shortName);
cropService.updateBlurp(crop, aboutBody, summary, getLocale()); cropService.updateBlurb(crop, aboutBody, summary, getLocale());
return "redirect:/c/" + shortName; return "redirect:/c/" + shortName;
} }
......
...@@ -46,7 +46,7 @@ public class GeoRegionController extends BaseController { ...@@ -46,7 +46,7 @@ public class GeoRegionController extends BaseController {
Country.sort(countryList, getLocale()); Country.sort(countryList, getLocale());
model.addAttribute("region", geoRegion); model.addAttribute("region", geoRegion);
model.addAttribute("blurp", contentService.getArticle(geoRegion, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(geoRegion, ContentService.ENTITY_BLURB_SLUG, getLocale()));
List<GeoRegion> subRegions = geoRegionService.getChildren(geoRegion.getIsoCode()); List<GeoRegion> subRegions = geoRegionService.getChildren(geoRegion.getIsoCode());
GeoRegion.sort(subRegions, getLocale()); GeoRegion.sort(subRegions, getLocale());
model.addAttribute("subRegions", subRegions); model.addAttribute("subRegions", subRegions);
...@@ -68,7 +68,7 @@ public class GeoRegionController extends BaseController { ...@@ -68,7 +68,7 @@ public class GeoRegionController extends BaseController {
} }
@RequestMapping("/{isoCode}/update") @RequestMapping("/{isoCode}/update")
public String update(ModelMap model, @PathVariable(value = "isoCode") String code, @RequestParam("blurp") String body, public String update(ModelMap model, @PathVariable(value = "isoCode") String code, @RequestParam("blurb") String body,
@RequestParam(value = "summary", required = false) String summary) throws CRMException { @RequestParam(value = "summary", required = false) String summary) throws CRMException {
LOG.debug("Updating region {}", code); LOG.debug("Updating region {}", code);
......
...@@ -97,10 +97,10 @@ public class HtmlController extends BaseController { ...@@ -97,10 +97,10 @@ public class HtmlController extends BaseController {
printSplit("cropList", stopWatch); printSplit("cropList", stopWatch);
model.addAttribute("lastNews", contentService.lastNews()); model.addAttribute("lastNews", contentService.lastNews());
printSplit("lastNews", stopWatch); printSplit("lastNews", stopWatch);
model.addAttribute("welcomeBlurp", contentService.getGlobalArticle(ContentService.WELCOME, getLocale())); model.addAttribute("welcomeBlurb", contentService.getGlobalArticle(ContentService.WELCOME, getLocale()));
printSplit("welcomeBlurp", stopWatch); printSplit("welcomeBlurb", stopWatch);
model.addAttribute("sideBlurp", contentService.getGlobalArticle(ContentService.SIDE_BLURP, getLocale())); model.addAttribute("sideBlurb", contentService.getGlobalArticle(ContentService.SIDE_BLURP, getLocale()));
printSplit("sideBlurp", stopWatch); printSplit("sideBlurb", stopWatch);
model.addAttribute("organizationsBlurb", contentService.getGlobalArticle(ContentService.WELCOME_ORGANIZATIONS, getLocale())); model.addAttribute("organizationsBlurb", contentService.getGlobalArticle(ContentService.WELCOME_ORGANIZATIONS, getLocale()));
printSplit("organizationsBlurb", stopWatch); printSplit("organizationsBlurb", stopWatch);
model.addAttribute("numberOfCountries", statisticsService.numberOfCountries()); model.addAttribute("numberOfCountries", statisticsService.numberOfCountries());
......
...@@ -50,7 +50,7 @@ public class ITPGRFAController extends BaseController { ...@@ -50,7 +50,7 @@ public class ITPGRFAController extends BaseController {
@RequestMapping @RequestMapping
public String view(ModelMap model, @RequestParam(value = "page", required = false, defaultValue = "1") int page) { public String view(ModelMap model, @RequestParam(value = "page", required = false, defaultValue = "1") int page) {
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.ITPGRFA_ABOUT, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.ITPGRFA_ABOUT, getLocale()));
model.addAttribute("countries", geoService.listITPGRFA(getLocale())); model.addAttribute("countries", geoService.listITPGRFA(getLocale()));
return "/itpgrfa/countries"; return "/itpgrfa/countries";
} }
......
...@@ -46,7 +46,7 @@ public class LookAndFeelController extends BaseController { ...@@ -46,7 +46,7 @@ public class LookAndFeelController extends BaseController {
public String index(ModelMap model) { public String index(ModelMap model) {
model.addAttribute("cropList", cropService.list(getLocale())); model.addAttribute("cropList", cropService.list(getLocale()));
model.addAttribute("lastNews", contentService.lastNews()); model.addAttribute("lastNews", contentService.lastNews());
model.addAttribute("welcomeBlurp", contentService.getGlobalArticle(ContentService.ABOUT, getLocale())); model.addAttribute("welcomeBlurb", contentService.getGlobalArticle(ContentService.ABOUT, getLocale()));
model.addAttribute("captchaSiteKey", captchaSiteKey); model.addAttribute("captchaSiteKey", captchaSiteKey);
return "/lookandfeel"; return "/lookandfeel";
......
...@@ -93,7 +93,7 @@ public class OrganizationController extends BaseController { ...@@ -93,7 +93,7 @@ public class OrganizationController extends BaseController {
model.addAttribute("organization", network); model.addAttribute("organization", network);
model.addAttribute("members", members); model.addAttribute("members", members);
model.addAttribute("blurp", contentService.getArticle(network, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(network, ContentService.ENTITY_BLURB_SLUG, getLocale()));
model.addAttribute("statisticsPDCI", statisticsService.statisticsPDCI(network)); model.addAttribute("statisticsPDCI", statisticsService.statisticsPDCI(network));
return "/organization/details"; return "/organization/details";
...@@ -134,7 +134,7 @@ public class OrganizationController extends BaseController { ...@@ -134,7 +134,7 @@ public class OrganizationController extends BaseController {
@PreAuthorize("hasRole('ADMINISTRATOR')") @PreAuthorize("hasRole('ADMINISTRATOR')")
@RequestMapping(value = "/{slug}/update") @RequestMapping(value = "/{slug}/update")
public String update(ModelMap model, @PathVariable(value = "slug") String slug, @RequestParam(value = "slug") String newSlug, public String update(ModelMap model, @PathVariable(value = "slug") String slug, @RequestParam(value = "slug") String newSlug,
@RequestParam("title") String title, @RequestParam("blurp") String blurp, @RequestParam(value = "summary", required = false) String summary) throws CRMException { @RequestParam("title") String title, @RequestParam("blurb") String blurb, @RequestParam(value = "summary", required = false) String summary) throws CRMException {
LOG.debug("Updating organization {}", slug); LOG.debug("Updating organization {}", slug);
PGRFANetwork network = networkService.getNetwork(slug); PGRFANetwork network = networkService.getNetwork(slug);
...@@ -145,7 +145,7 @@ public class OrganizationController extends BaseController { ...@@ -145,7 +145,7 @@ public class OrganizationController extends BaseController {
network = networkService.update(network.getId(), newSlug, title); network = networkService.update(network.getId(), newSlug, title);
} }
networkService.updateAbout(network, blurp, summary, getLocale()); networkService.updateAbout(network, blurb, summary, getLocale());
return "redirect:/org/" + network.getSlug(); return "redirect:/org/" + network.getSlug();
} }
......
...@@ -108,7 +108,7 @@ public class ProjectController extends BaseController { ...@@ -108,7 +108,7 @@ public class ProjectController extends BaseController {
model.addAttribute("project", project); model.addAttribute("project", project);
List<AccessionList> accessionLists = accessionListService.getLists(project.getAccessionLists()); List<AccessionList> accessionLists = accessionListService.getLists(project.getAccessionLists());
model.addAttribute("accessionLists", accessionLists); model.addAttribute("accessionLists", accessionLists);
model.addAttribute("blurp", contentService.getArticle(project, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(project, ContentService.ENTITY_BLURB_SLUG, getLocale()));
// Statistics // Statistics
int countByProject = accessionListService.distinctCount(accessionLists); int countByProject = accessionListService.distinctCount(accessionLists);
...@@ -158,7 +158,7 @@ public class ProjectController extends BaseController { ...@@ -158,7 +158,7 @@ public class ProjectController extends BaseController {
} }
@RequestMapping("/update-project") @RequestMapping("/update-project")
public String update(ModelMap modelMap, @ModelAttribute("project") Project p, @RequestParam("blurp") String aboutBody, public String update(ModelMap modelMap, @ModelAttribute("project") Project p, @RequestParam("blurb") String aboutBody,
@RequestParam(value = "summary", required = false) String summary, @RequestParam(value = "accessionListTitle", required = false) List<String> titles) throws CRMException { @RequestParam(value = "summary", required = false) String summary, @RequestParam(value = "accessionListTitle", required = false) List<String> titles) throws CRMException {
LOG.debug("Updating project {}", p.getCode()); LOG.debug("Updating project {}", p.getCode());
...@@ -185,7 +185,7 @@ public class ProjectController extends BaseController { ...@@ -185,7 +185,7 @@ public class ProjectController extends BaseController {
project.setAccessionLists(projectAccessionLists); project.setAccessionLists(projectAccessionLists);
projectService.saveProject(project); projectService.saveProject(project);
projectService.updateBlurp(project, aboutBody, summary, getLocale()); projectService.updateBlurb(project, aboutBody, summary, getLocale());
return "redirect:/project/" + p.getCode(); return "redirect:/project/" + p.getCode();
} }
......
...@@ -82,7 +82,7 @@ public class RequestController extends BaseController { ...@@ -82,7 +82,7 @@ public class RequestController extends BaseController {
*/ */
@RequestMapping @RequestMapping
public String view(ModelMap model, @RequestParam(value = "page", required = false, defaultValue = "1") int page) { public String view(ModelMap model, @RequestParam(value = "page", required = false, defaultValue = "1") int page) {
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REQUEST_INTRO, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REQUEST_INTRO, getLocale()));
model.addAttribute("totalCount", selectionBean.size()); model.addAttribute("totalCount", selectionBean.size());
model.addAttribute("availableCount", genesysService.countAvailableForDistribution(selectionBean.copy())); model.addAttribute("availableCount", genesysService.countAvailableForDistribution(selectionBean.copy()));
...@@ -94,7 +94,7 @@ public class RequestController extends BaseController { ...@@ -94,7 +94,7 @@ public class RequestController extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = "/start") @RequestMapping(method = RequestMethod.POST, value = "/start")
public String start(ModelMap model) { public String start(ModelMap model) {
final User currentUser = SecurityContextUtil.getCurrentUser(); final User currentUser = SecurityContextUtil.getCurrentUser();
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REQUEST_PERSONAL, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REQUEST_PERSONAL, getLocale()));
model.addAttribute("captchaSiteKey", captchaSiteKey); model.addAttribute("captchaSiteKey", captchaSiteKey);
if (!model.containsAttribute("requestEmail") && currentUser != null) { if (!model.containsAttribute("requestEmail") && currentUser != null) {
...@@ -153,15 +153,15 @@ public class RequestController extends BaseController { ...@@ -153,15 +153,15 @@ public class RequestController extends BaseController {
} }
// Whatever the response is, we render the same message // Whatever the response is, we render the same message
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REQUEST_RECEIVED, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REQUEST_RECEIVED, getLocale()));
return "/request/received"; return "/request/received";
} }
@RequestMapping(value = "/{tokenUuid:.+}/validate", method = RequestMethod.GET) @RequestMapping(value = "/{tokenUuid:.+}/validate", method = RequestMethod.GET)
public String validateClientRequest(ModelMap model, @PathVariable("tokenUuid") String tokenUuid, public String validateClientRequest(ModelMap model, @PathVariable("tokenUuid") String tokenUuid,
@RequestParam(value = "key", required = false) String key) { @RequestParam(value = "key", required = false) String key) {
if (!model.containsAttribute("blurp")) { if (!model.containsAttribute("blurb")) {
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REQUEST_VALIDATE, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REQUEST_VALIDATE, getLocale()));
} }
model.addAttribute("tokenUuid", tokenUuid); model.addAttribute("tokenUuid", tokenUuid);
model.addAttribute("key", key); model.addAttribute("key", key);
...@@ -177,7 +177,7 @@ public class RequestController extends BaseController { ...@@ -177,7 +177,7 @@ public class RequestController extends BaseController {
} catch (final RequestService.NoPidException e) { } catch (final RequestService.NoPidException e) {
LOG.error(e.getMessage()); LOG.error(e.getMessage());
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REQUEST_VALIDATE_NO_PID, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REQUEST_VALIDATE_NO_PID, getLocale()));
return validateClientRequest(model, tokenUuid, key); return validateClientRequest(model, tokenUuid, key);
} catch (final RequestException e) { } catch (final RequestException e) {
...@@ -208,8 +208,8 @@ public class RequestController extends BaseController { ...@@ -208,8 +208,8 @@ public class RequestController extends BaseController {
*/ */
@RequestMapping(value = "/{tokenUuid:.+}/confirm", method = RequestMethod.GET) @RequestMapping(value = "/{tokenUuid:.+}/confirm", method = RequestMethod.GET)
public String confirmReceipt(ModelMap model, @PathVariable("tokenUuid") String tokenUuid, @RequestParam(value = "key", required = false) String key) { public String confirmReceipt(ModelMap model, @PathVariable("tokenUuid") String tokenUuid, @RequestParam(value = "key", required = false) String key) {
if (!model.containsAttribute("blurp")) { if (!model.containsAttribute("blurb")) {
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REQUEST_CONFIRM_RECEIPT, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REQUEST_CONFIRM_RECEIPT, getLocale()));
} }
model.addAttribute("tokenUuid", tokenUuid); model.addAttribute("tokenUuid", tokenUuid);
......
...@@ -67,7 +67,7 @@ public class TeamController extends BaseController { ...@@ -67,7 +67,7 @@ public class TeamController extends BaseController {
} }
model.addAttribute("team", team); model.addAttribute("team", team);
model.addAttribute("teammembers", teamService.getMembers(team)); model.addAttribute("teammembers", teamService.getMembers(team));
model.addAttribute("blurp", contentService.getArticle(team, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(team, ContentService.ENTITY_BLURB_SLUG, getLocale()));
return "/team/details"; return "/team/details";
} }
...@@ -85,7 +85,7 @@ public class TeamController extends BaseController { ...@@ -85,7 +85,7 @@ public class TeamController extends BaseController {
} catch (final UsernameNotFoundException e) { } catch (final UsernameNotFoundException e) {
model.addAttribute("team", team); model.addAttribute("team", team);
model.addAttribute("teammembers", teamService.getMembers(team)); model.addAttribute("teammembers", teamService.getMembers(team));
model.addAttribute("blurp", contentService.getArticle(team, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(team, ContentService.ENTITY_BLURB_SLUG, getLocale()));
model.addAttribute("error", "error"); model.addAttribute("error", "error");
return "/team/details"; return "/team/details";
} }
......
...@@ -187,7 +187,7 @@ public class UserProfileController extends BaseController { ...@@ -187,7 +187,7 @@ public class UserProfileController extends BaseController {
@RequestMapping(value = "/forgot-password") @RequestMapping(value = "/forgot-password")
public String forgotPassword(ModelMap model) { public String forgotPassword(ModelMap model) {
model.addAttribute("captchaSiteKey", captchaSiteKey); model.addAttribute("captchaSiteKey", captchaSiteKey);
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.USER_RESET_PASSWORD_INSTRUCTIONS, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.USER_RESET_PASSWORD_INSTRUCTIONS, getLocale()));
return "/user/email"; return "/user/email";
} }
......
...@@ -68,7 +68,7 @@ public class UserRegistrationController extends BaseController { ...@@ -68,7 +68,7 @@ public class UserRegistrationController extends BaseController {
@RequestMapping(value = "/registration", method = RequestMethod.GET) @RequestMapping(value = "/registration", method = RequestMethod.GET)
public String registration(ModelMap model) { public String registration(ModelMap model) {
model.addAttribute("captchaSiteKey", captchaSiteKey); model.addAttribute("captchaSiteKey", captchaSiteKey);
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REGISTRATION, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REGISTRATION, getLocale()));
model.addAttribute("user", new User()); model.addAttribute("user", new User());
return "/registration"; return "/registration";
...@@ -125,7 +125,7 @@ public class UserRegistrationController extends BaseController { ...@@ -125,7 +125,7 @@ public class UserRegistrationController extends BaseController {
model.addAttribute("user", user); model.addAttribute("user", user);
model.addAttribute("captchaSiteKey", captchaSiteKey); model.addAttribute("captchaSiteKey", captchaSiteKey);
model.addAttribute("blurp", contentService.getGlobalArticle(ContentService.REGISTRATION, getLocale())); model.addAttribute("blurb", contentService.getGlobalArticle(ContentService.REGISTRATION, getLocale()));
return "/registration"; return "/registration";
} }
......
...@@ -177,8 +177,8 @@ public class WiewsController extends BaseController { ...@@ -177,8 +177,8 @@ public class WiewsController extends BaseController {
model.addAttribute("faoInstitute", faoInstitute); model.addAttribute("faoInstitute", faoInstitute);
model.addAttribute("organizations", networkService.getNetworksFor(faoInstitute)); model.addAttribute("organizations", networkService.getNetworksFor(faoInstitute));
LOG.trace("organizations after {}ms", stopWatch.getTime()); LOG.trace("organizations after {}ms", stopWatch.getTime());
model.addAttribute("blurp", contentService.getArticle(faoInstitute, ContentService.ENTITY_BLURB_SLUG, getLocale())); model.addAttribute("blurb", contentService.getArticle(faoInstitute, ContentService.ENTITY_BLURB_SLUG, getLocale()));
LOG.trace("blurp after {}ms", stopWatch.getTime()); LOG.trace("blurb after {}ms", stopWatch.getTime());
model.addAttribute("countByInstitute", faoInstitute.getAccessionCount()); model.addAttribute("countByInstitute", faoInstitute.getAccessionCount());
LOG.trace("countByInstitute after {}ms", stopWatch.getTime()); LOG.trace("countByInstitute after {}ms", stopWatch.getTime());
...@@ -300,7 +300,7 @@ public class WiewsController extends BaseController { ...@@ -300,7 +300,7 @@ public class WiewsController extends BaseController {
} }
@RequestMapping("/{wiewsCode}/update") @RequestMapping("/{wiewsCode}/update")
public String update(ModelMap model, @PathVariable(value = "wiewsCode") String wiewsCode, @RequestParam("blurp") String aboutBody, public String update(ModelMap model, @PathVariable(value = "wiewsCode") String wiewsCode, @RequestParam("blurb") String aboutBody,
@RequestParam(value = "summary", required = false) String summary, @RequestParam("gaTracker") String gaTracker, @RequestParam("mailto") String mailto, @RequestParam(value = "summary", required = false) String summary, @RequestParam("gaTracker") String gaTracker, @RequestParam("mailto") String mailto,
@RequestParam("uniqueAcceNumbs") boolean uniqueAcceNumbs, @RequestParam("uniqueAcceNumbs") boolean uniqueAcceNumbs,
@RequestParam(value = "allowMaterialRequests", required = false, defaultValue = "false") boolean allowMaterialRequests, @RequestParam("codeSVGS") String codeSVGS) @RequestParam(value = "allowMaterialRequests", required = false, defaultValue = "false") boolean allowMaterialRequests, @RequestParam("codeSVGS") String codeSVGS)
......
...@@ -34,12 +34,12 @@ import org.springframework.data.domain.Page; ...@@ -34,12 +34,12 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
public interface ContentService { public interface ContentService {
public final String ENTITY_BLURB_SLUG = "blurp"; public final String ENTITY_BLURB_SLUG = "blurb";
public final String ABOUT = "about"; public final String ABOUT = "about";
public final String WELCOME = "welcome"; public final String WELCOME = "welcome";
public final String COOKIES = "cookies"; public final String COOKIES = "cookies";
public final String SIDE_BLURP = "sideBlurp"; public final String SIDE_BLURP = "sideBlurb";
public final String DISCLAIMER = "disclaimer"; public final String DISCLAIMER = "disclaimer";
public final String REGISTRATION = "registration"; public final String REGISTRATION = "registration";
public final String REQUEST_INTRO = "request-intro"; public final String REQUEST_INTRO = "request-intro";
......
...@@ -53,7 +53,7 @@ public interface CropService { ...@@ -53,7 +53,7 @@ public interface CropService {
List<Crop> getCrops(Taxonomy2 taxonomy2); List<Crop> getCrops(Taxonomy2 taxonomy2);
void updateBlurp(Crop crop, String textBody, String summary, Locale locale) throws CRMException; void updateBlurb(Crop crop, String textBody, String summary, Locale locale) throws CRMException;
void rebuildTaxonomies(); void rebuildTaxonomies();
......
...@@ -69,7 +69,7 @@ public interface GeoService { ...@@ -69,7 +69,7 @@ public interface GeoService {
List<Country> listAll(); List<Country> listAll();
void updateBlurp(Country country, String blurp, Locale locale) throws CRMException; void updateBlurb(Country country, String blurb, Locale locale) throws CRMException;
List<Country> listAll(Locale locale); List<Country> listAll(Locale locale);
......
...@@ -39,5 +39,5 @@ public interface ProjectService { ...@@ -39,5 +39,5 @@ public interface ProjectService {
void deleteProject(Project project); void deleteProject(Project project);
void updateBlurp(Project project, String textBody, String summary, Locale locale) throws CRMException; void updateBlurb(Project project, String textBody, St