From 267ae5c37c9b42d21df2c4fcc1d1d5589f7931d2 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jan 16 2018 12:19:49 +0000 Subject: add user and team bio into the hubconfig and hub header --- diff --git a/hubs/models/hubconfig.py b/hubs/models/hubconfig.py index 08d2923..ae19eb0 100644 --- a/hubs/models/hubconfig.py +++ b/hubs/models/hubconfig.py @@ -90,6 +90,7 @@ class HubConfigProxy(MutableMapping): KEYS = ( "archived", "summary", "left_width", "avatar", "visibility", "chat_domain", "chat_channel", "mailing_list", "calendar", + "bio", ) + tuple(p["name"] for p in DEV_PLATFORMS) CONVERTERS = { "archived": BooleanConverter(), @@ -103,6 +104,7 @@ class HubConfigProxy(MutableMapping): "visibility": "public", "left_width": 8, "avatar": "", + "bio": "", } LISTS = ("pagure", "github") VALIDATORS = { diff --git a/hubs/static/client/app/components/HubConfig/HubConfigPanelGeneral.js b/hubs/static/client/app/components/HubConfig/HubConfigPanelGeneral.js index 9bcd6df..a58ad0a 100644 --- a/hubs/static/client/app/components/HubConfig/HubConfigPanelGeneral.js +++ b/hubs/static/client/app/components/HubConfig/HubConfigPanelGeneral.js @@ -23,6 +23,14 @@ const messages = defineMessages({ id: "hubs.core.config.general.summary_help", defaultMessage: "This text will be displayed at the top of the hub.", }, + bio: { + id: "hubs.core.config.general.bio", + defaultMessage: "Summary", + }, + bio_help: { + id: "hubs.core.config.general.bio_help", + defaultMessage: "A short paragraph describing the hub", + }, left_width: { id: "hubs.core.config.general.left_width", defaultMessage: "Left width", @@ -76,7 +84,7 @@ export default class GeneralPanel extends React.Component { let invalid = {}; if (this.props.error && this.props.error.fields) { - ["summary", "left_width", "visibility", "avatar"].forEach((key) => { + ["summary", "left_width", "visibility", "avatar", "bio"].forEach((key) => { invalid[key] = this.props.error.fields[key]; }); } @@ -108,6 +116,28 @@ export default class GeneralPanel extends React.Component {

+ +