From 57897cc8c2c90ab1566a65bcd1eabfd41a906070 Mon Sep 17 00:00:00 2001 From: Sergey Dryabzhinsky Date: Mon, 11 Jun 2018 15:34:26 +0300 Subject: repo: update repository description field to contain more than 256 symbols (#5219) * Update repository description field to contain more than 256 symbols - update repository model - description field now is `TEXT` and limited by 4000 symbols - new migration - add description to html forms - repo creation and repo settings - add translation for description * Update for description field, new features - add autosize (height) for description textarea, new plugin - set max description length to 512 symbols - update locales * Fix migration - typo in var * Update repo description behaviour - add textarea autosize for /repo/create - add symbols counter under description testarea (create/edit) * Fix function definition - it a var * Revert ru-RU locale * Update by review - Use type `varchar(512)` in migration - Remove unused files from autosize plugin * Fix migration - new project paths * Fixes after review 2 - copyright year - format includes - use switch instead of multi-if * Remove unused `default:` option. --- routes/repo/repo.go | 1 + routes/repo/setting.go | 1 + 2 files changed, 2 insertions(+) (limited to 'routes') diff --git a/routes/repo/repo.go b/routes/repo/repo.go index 29e2a8e7..b8afb340 100644 --- a/routes/repo/repo.go +++ b/routes/repo/repo.go @@ -75,6 +75,7 @@ func Create(c *context.Context) { c.Data["readme"] = "Default" c.Data["private"] = c.User.LastRepoVisibility c.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate + c.Data["RequireAutosize"] = true ctxUser := checkContextUser(c, c.QueryInt64("org")) if c.Written() { diff --git a/routes/repo/setting.go b/routes/repo/setting.go index 71827cc3..edf6216d 100644 --- a/routes/repo/setting.go +++ b/routes/repo/setting.go @@ -34,6 +34,7 @@ const ( func Settings(c *context.Context) { c.Title("repo.settings") c.PageIs("SettingsOptions") + c.Data["RequireAutosize"] = true c.Success(SETTINGS_OPTIONS) } -- cgit v1.2.3