diff --git a/src/main/resources/templates/projects/channels/helper/modalManage.ftlh b/src/main/resources/templates/projects/channels/helper/modalManage.ftlh index 895d1c163..07248df4e 100644 --- a/src/main/resources/templates/projects/channels/helper/modalManage.ftlh +++ b/src/main/resources/templates/projects/channels/helper/modalManage.ftlh @@ -1,55 +1,58 @@ <#import "/spring.ftl" as spring /> <#import "*/utils/hangar.ftlh" as hangar /> +<#import "*/projects/channels/helper/popoverColorPicker.ftlh" as popoverColorPicker /> @import ore.OreConfig @import views.html.helper.{CSRF, form} @()(implicit messages: Messages, config: OreConfig, request: Request[_]) - - + diff --git a/src/main/resources/templates/projects/channels/helper/popoverColorPicker.ftlh b/src/main/resources/templates/projects/channels/helper/popoverColorPicker.ftlh index 157f7a5be..1dfc5f5ae 100644 --- a/src/main/resources/templates/projects/channels/helper/popoverColorPicker.ftlh +++ b/src/main/resources/templates/projects/channels/helper/popoverColorPicker.ftlh @@ -1,51 +1,55 @@ <#import "/spring.ftl" as spring /> <#import "*/utils/hangar.ftlh" as hangar /> +<#-- TODO: all the color stuff --> +<#-- also, we could just move this macro over to modalManage? not used anywhere else --> @import ore.models.project.Channel.Colors -@() - - - - - - - - - - - - - - - - - - - - - - +<#macro popoverColorPicker> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/projects/channels/list.ftlh b/src/main/resources/templates/projects/channels/list.ftlh index 12ebd53e5..1a028d29a 100644 --- a/src/main/resources/templates/projects/channels/list.ftlh +++ b/src/main/resources/templates/projects/channels/list.ftlh @@ -1,5 +1,6 @@ <#import "/spring.ftl" as spring /> <#import "*/utils/hangar.ftlh" as hangar /> +<#import "*/projects/channels/helper/modalManage.ftlh" as modalManage /> @import controllers.sugar.Requests.OreRequest @import models.viewhelper.ProjectData @@ -97,7 +98,7 @@ > - ${projects.channels.helper.modalManage()} + <@modalManage.modalManage /> diff --git a/src/main/resources/templates/projects/pages/view.ftlh b/src/main/resources/templates/projects/pages/view.ftlh index 322ec4b81..afe7f2160 100644 --- a/src/main/resources/templates/projects/pages/view.ftlh +++ b/src/main/resources/templates/projects/pages/view.ftlh @@ -1,9 +1,10 @@ <#import "/spring.ftl" as spring /> <#import "*/utils/hangar.ftlh" as hangar /> +<#import "*/projects/view.ftlh" as projectView /> -@* +<#-- Documentation page within Project overview. -*@ +--> @import java.text.NumberFormat @@ -44,7 +45,7 @@ Documentation page within Project overview. -@projects.view(p, sp, "#docs", additionalScripts = scripts) { +<@projectView.view p sp "#docs" additionalScripts=scriptsVar>
@@ -64,18 +65,18 @@ Documentation page within Project overview.
-

<@spring.message "project.category.info", p.project.category.title />

-

<@spring.message "project.publishDate", prettifyDate(p.project.createdAt) />

+

<@spring.messageArgs "project.category.info", p.project.category.title />

+

<@spring.messageArgs "project.publishDate", prettifyDate(p.project.createdAt) />

views

stars

watchers

total downloads

- @p.project.settings.licenseName.map { licenseName => + <#list p.project.settings.licenseName as licenseName>

- @Html(messages("project.license.link")) - ${licenseName} + <@spring.message "project.license.link" /> + ${licenseName}

- } +
@@ -144,5 +145,4 @@ Documentation page within Project overview. )
- -} + diff --git a/src/main/resources/templates/projects/versions/create.ftlh b/src/main/resources/templates/projects/versions/create.ftlh index 1e19b29d2..193635b28 100644 --- a/src/main/resources/templates/projects/versions/create.ftlh +++ b/src/main/resources/templates/projects/versions/create.ftlh @@ -189,6 +189,6 @@
- ${projects.channels.helper.modalManage()} + <@modalManage.modalManage /> diff --git a/src/main/resources/templates/projects/view.ftlh b/src/main/resources/templates/projects/view.ftlh index 44363b5c4..cf69dfb06 100644 --- a/src/main/resources/templates/projects/view.ftlh +++ b/src/main/resources/templates/projects/view.ftlh @@ -4,6 +4,7 @@ <#-- Base template for Project overview. +TODO: this is a layout, should we move/rename it? --> <#-- @@ -21,41 +22,43 @@ Base template for Project overview. request: OreRequest[_], flash: Flash, config: OreConfig, renderer: MarkdownRenderer, assetsFinder: AssetsFinder) --> -<#assign scriptsVar> - - - -} - +<#macro view p sp active noButtons=false additionalScripts="" additionalStyling=""> + <#assign scriptsVar> + + + ${additionalScripts} + + } + -<#assign metaVar> - - - - - " /> - - + <#assign metaVar> + + + + + " /> + + -<@base.base title=(p.project.ownerName + " / " + p.project.name) additionalScripts=scriptsVar additionalMeta=metaVar> -
- <#if p.visibility != Visibility.Public> -
-
-