Skip to content

Create repository form rewording and redesign #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conf/app.ini
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ ENABLE_RAW_FILE_RENDER_MODE = false
RAW_CAPTCHA_MIN_FILE_SIZE = 50
; File size from which on repo file view is protected by captures
CAPTCHA_MIN_FILE_SIZE = 5
; If enabled, will select "Initialize this repository" on the repository
; creation page by default
AUTO_INIT = false


[repository.editor]
Expand Down
5 changes: 4 additions & 1 deletion conf/locale/locale_en-GB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ delete_account_desc=This account is going to be deleted permanently, do you want
[repo]
owner=Owner
repo_name=Repository Name
repo_name_helper=Repository names should be short, memorable and unique. It must be one word (no spaces) and can contain letters (a-z), numbers (0-9), dash (-), underscore (_), or dot (.) characters.
repo_name_helper=Will be used to define the URL (path) of the repository. It must be one word (no spaces) and can contain letters (a-z, A-Z), numbers (0-9), dash (-), underscore (_), or dot (.) characters. Repository names should be short, unique and specific (do not use a generic name like "dataset", "plos_paper", etc).
visibility=Private
visiblity_helper=Accessible only to owner and assigned collaborators
visiblity_helper_forced=New repositories are private by default. You can change the state later.
Expand All @@ -412,10 +412,13 @@ fork_visiblity_helper=You cannot alter the visibility of a forked repository.
repo_desc=Description
repo_lang=Language
repo_gitignore_helper=Select .gitignore templates
repo_gitignore_tooltip = Files to exclude from versioning. In the case of data repositories you probably don't need this. If in doubt, ignore.
license=Licence
license_helper=Select a licence file
license_tooltip=A license is essential for a data or code publication. You can choose a license now, or add a license file to the repository later.
readme=Readme
readme_helper=Select a readme template
readme_tooltip=The file to enter a description of your repository with information to understand and use it. The README file contents will be displayed when accessing your repository through a web browser.
auto_init=Initialise this repository with selected files and template
create_repo=Create Repository
default_branch=Default Branch
Expand Down
5 changes: 4 additions & 1 deletion conf/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ delete_account_desc = This account is going to be deleted permanently, do you wa
[repo]
owner = Owner
repo_name = Repository Name
repo_name_helper = Repository names should be short, memorable and unique. It must be one word (no spaces) and can contain letters (a-z), numbers (0-9), dash (-), underscore (_), or dot (.) characters.
repo_name_helper = Will be used to define the URL (path) of the repository. It must be one word (no spaces) and can contain letters (a-z, A-Z), numbers (0-9), dash (-), underscore (_), or dot (.) characters. Repository names should be short, unique and specific (do not use a generic name like "dataset", "plos_paper", etc).
visibility = Private
visiblity_helper = Accessible only to owner and assigned collaborators
visiblity_helper_forced = New repositories are private by default. You can change the state later.
Expand All @@ -415,10 +415,13 @@ fork_visiblity_helper = You cannot alter the visibility of a forked repository.
repo_desc = Description
repo_lang = Language
repo_gitignore_helper = Select .gitignore templates
repo_gitignore_tooltip = Files to exclude from versioning. In the case of data repositories you probably don't need this. If in doubt, ignore.
license = License
license_helper = Select a license file
license_tooltip = A license is essential for a data or code publication. You can choose a license now, or add a license file to the repository later.
readme = Readme
readme_helper = Select a readme template
readme_tooltip = The file to enter a description of your repository with information to understand and use it. The README file contents will be displayed when accessing your repository through a web browser.
auto_init = Initialize this repository with selected files and template
create_repo = Create Repository
default_branch = Default Branch
Expand Down
36,798 changes: 34,788 additions & 2,010 deletions internal/bindata/bindata.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions internal/route/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func Create(c *context.Context) {
c.Data["readme"] = "Default"
c.Data["private"] = c.User.LastRepoVisibility
c.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate
c.Data["auto_init"] = setting.Repository.AutoInit

ctxUser := checkContextUser(c, c.QueryInt64("org"))
if c.Written() {
Expand Down
1 change: 1 addition & 0 deletions internal/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ var (
EnableRawFileRenderMode bool
RawCaptchaMinFileSize int64
CaptchaMinFileSize int64
AutoInit bool

// Repository editor settings
Editor struct {
Expand Down
15 changes: 10 additions & 5 deletions templates/repo/create.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@
<span class="help">{{.i18n.Tr "repo.repo_description_helper" | Safe}}</span>
<span class="help">{{.i18n.Tr "repo.repo_description_length"}}: <span id="descLength"></span></span>
</div>
</div>

<div class="ui divider"></div>

<div class="inline field" data-tooltip="In the case of data repositories you probably don't need this">
<h3 class="ui attached header">
Initial Files
</h3>
<div class="ui attached segment">
<div class="inline field" data-tooltip={{.i18n.Tr "repo.repo_gitignore_tooltip"}}>
<label>.gitignore</label>
<a target="_blank" href="https://git-scm.com/docs/gitignore"><span class="octicon octicon-question"></span></a>
<div class="ui multiple search normal selection dropdown">
Expand All @@ -72,7 +75,7 @@
</div>
</div>
</div>
<div class="inline field" data-tooltip="You can choose a license now, or add one to the repository later">
<div class="inline field" data-tooltip={{.i18n.Tr "repo.license_tooltip"}}>
<label>{{.i18n.Tr "repo.license"}}</label>
<a target="_blank" href="/G-Node/Info/wiki/Licensing"><span class="octicon octicon-question"></span></a>
<div class="ui search selection dropdown">
Expand All @@ -87,7 +90,7 @@
</div>
</div>

<div class="inline field">
<div class="inline field" data-tooltip={{.i18n.Tr "repo.readme_tooltip"}}>
<label>{{.i18n.Tr "repo.readme"}}</label>
<div class="ui selection dropdown">
<input type="hidden" name="readme" value="{{.readme}}">
Expand All @@ -105,7 +108,9 @@
<label>{{.i18n.Tr "repo.auto_init"}}</label>
</div>
</div>
</div>

<div class="ui attached segment">
<div class="inline field">
<label></label>
<button class="ui green button">
Expand Down