diff --git a/app/lib/frontend/templates/admin.dart b/app/lib/frontend/templates/admin.dart index a4d4f1c47d..9dc0e474fa 100644 --- a/app/lib/frontend/templates/admin.dart +++ b/app/lib/frontend/templates/admin.dart @@ -20,20 +20,20 @@ import 'layout.dart'; import 'listing.dart'; import 'publisher.dart' show renderPublisherList; -/// Renders the `views/authorized.mustache` template. +/// Renders the `views/account/authorized.mustache` template. String renderAuthorizedPage() { - final String content = templateCache.renderTemplate('authorized', {}); + final String content = templateCache.renderTemplate('account/authorized', {}); return renderLayoutPage(PageType.package, content, title: 'Pub Authorized Successfully', includeSurvey: false); } -/// Renders the `views/consent.mustache` template. +/// Renders the `views/account/consent.mustache` template. String renderConsentPage({ @required String consentId, @required String title, @required String descriptionHtml, }) { - final content = templateCache.renderTemplate('consent', { + final content = templateCache.renderTemplate('account/consent', { 'title': title, 'description_html': descriptionHtml, }); diff --git a/app/lib/frontend/templates/landing.dart b/app/lib/frontend/templates/landing.dart index b682edfa92..6dd6d0f8a6 100644 --- a/app/lib/frontend/templates/landing.dart +++ b/app/lib/frontend/templates/landing.dart @@ -9,7 +9,7 @@ import '_cache.dart'; import 'layout.dart'; import 'misc.dart' show renderMiniList; -/// Renders the `views/landing.mustache` template. +/// Renders the `views/page/landing.mustache` template. String renderLandingPage({ List taggedPackages, List topPackages, @@ -24,7 +24,7 @@ String renderLandingPage({ 'top_minilist_html': hasTop ? renderMiniList(topPackages) : null, 'top_more_url': urls.searchUrl(), }; - final String content = templateCache.renderTemplate('landing', values); + final String content = templateCache.renderTemplate('page/landing', values); return renderLayoutPage( PageType.landing, content, diff --git a/app/lib/frontend/templates/layout.dart b/app/lib/frontend/templates/layout.dart index 715639dd48..fc2557d32e 100644 --- a/app/lib/frontend/templates/layout.dart +++ b/app/lib/frontend/templates/layout.dart @@ -33,7 +33,7 @@ enum PageType { standalone, } -/// Renders the `views/layout.mustache` template. +/// Renders the `views/shared/layout.mustache` template. String renderLayoutPage( PageType type, String contentHtml, { @@ -93,7 +93,7 @@ String renderLayoutPage( 'page_data_encoded': pageDataEncoded, }; - return templateCache.renderTemplate('layout', values); + return templateCache.renderTemplate('shared/layout', values); } String _renderSiteHeader() { diff --git a/app/lib/frontend/templates/listing.dart b/app/lib/frontend/templates/listing.dart index 5b41f46461..de954affb9 100644 --- a/app/lib/frontend/templates/listing.dart +++ b/app/lib/frontend/templates/listing.dart @@ -18,12 +18,12 @@ import '_utils.dart'; import 'layout.dart'; import 'misc.dart'; -/// Renders the `views/pagination.mustache` template. +/// Renders the `views/shared/pagination.mustache` template. String renderPagination(PageLinks pageLinks) { final values = { 'page_links': pageLinks.hrefPatterns(), }; - return templateCache.renderTemplate('pagination', values); + return templateCache.renderTemplate('shared/pagination', values); } /// Renders the `views/pkg/package_list.mustache` template. diff --git a/app/lib/frontend/templates/misc.dart b/app/lib/frontend/templates/misc.dart index f030053641..0315daf1c0 100644 --- a/app/lib/frontend/templates/misc.dart +++ b/app/lib/frontend/templates/misc.dart @@ -44,9 +44,9 @@ String renderUnauthorizedPage({String messageMarkdown}) { ); } -/// Renders the `views/help.mustache` template. +/// Renders the `views/page/help.mustache` template. String renderHelpPage() { - final String content = templateCache.renderTemplate('help', { + final String content = templateCache.renderTemplate('page/help', { 'dart_site_root': urls.dartSiteRoot, 'pana_url': urls.panaUrl(), 'pana_maintenance_url': urls.panaMaintenanceUrl(), @@ -55,14 +55,14 @@ String renderHelpPage() { title: 'Help | Dart packages'); } -/// Renders the `views/security.mustache` template. +/// Renders the `views/page/security.mustache` template. String renderSecurityPage() { - final String content = templateCache.renderTemplate('security', {}); + final String content = templateCache.renderTemplate('page/security', {}); return renderLayoutPage(PageType.standalone, content, title: 'Security | Pub site'); } -/// Renders the `views/show.mustache` template. +/// Renders the `views/page/error.mustache` template. String renderErrorPage( String title, String message, List topPackages) { final hasTopPackages = topPackages != null && topPackages.isNotEmpty; @@ -73,7 +73,7 @@ String renderErrorPage( 'has_top_packages': hasTopPackages, 'top_packages_html': topPackagesHtml, }; - final String content = templateCache.renderTemplate('error', values); + final String content = templateCache.renderTemplate('page/error', values); return renderLayoutPage( PageType.error, content, @@ -82,7 +82,7 @@ String renderErrorPage( ); } -/// Renders the `views/mini_list.mustache` template. +/// Renders the `views/pkg/mini_list.mustache` template. String renderMiniList(List packages) { final values = { 'packages': packages.map((package) { @@ -103,7 +103,7 @@ String renderMiniList(List packages) { }; }).toList(), }; - return templateCache.renderTemplate('mini_list', values); + return templateCache.renderTemplate('pkg/mini_list', values); } /// Renders the tags using the pkg/tags template. diff --git a/app/lib/frontend/templates/views/authorized.mustache b/app/lib/frontend/templates/views/account/authorized.mustache similarity index 100% rename from app/lib/frontend/templates/views/authorized.mustache rename to app/lib/frontend/templates/views/account/authorized.mustache diff --git a/app/lib/frontend/templates/views/consent.mustache b/app/lib/frontend/templates/views/account/consent.mustache similarity index 100% rename from app/lib/frontend/templates/views/consent.mustache rename to app/lib/frontend/templates/views/account/consent.mustache diff --git a/app/lib/frontend/templates/views/error.mustache b/app/lib/frontend/templates/views/page/error.mustache similarity index 100% rename from app/lib/frontend/templates/views/error.mustache rename to app/lib/frontend/templates/views/page/error.mustache diff --git a/app/lib/frontend/templates/views/help.mustache b/app/lib/frontend/templates/views/page/help.mustache similarity index 100% rename from app/lib/frontend/templates/views/help.mustache rename to app/lib/frontend/templates/views/page/help.mustache diff --git a/app/lib/frontend/templates/views/landing.mustache b/app/lib/frontend/templates/views/page/landing.mustache similarity index 100% rename from app/lib/frontend/templates/views/landing.mustache rename to app/lib/frontend/templates/views/page/landing.mustache diff --git a/app/lib/frontend/templates/views/security.mustache b/app/lib/frontend/templates/views/page/security.mustache similarity index 100% rename from app/lib/frontend/templates/views/security.mustache rename to app/lib/frontend/templates/views/page/security.mustache diff --git a/app/lib/frontend/templates/views/mini_list.mustache b/app/lib/frontend/templates/views/pkg/mini_list.mustache similarity index 100% rename from app/lib/frontend/templates/views/mini_list.mustache rename to app/lib/frontend/templates/views/pkg/mini_list.mustache diff --git a/app/lib/frontend/templates/views/layout.mustache b/app/lib/frontend/templates/views/shared/layout.mustache similarity index 100% rename from app/lib/frontend/templates/views/layout.mustache rename to app/lib/frontend/templates/views/shared/layout.mustache diff --git a/app/lib/frontend/templates/views/pagination.mustache b/app/lib/frontend/templates/views/shared/pagination.mustache similarity index 100% rename from app/lib/frontend/templates/views/pagination.mustache rename to app/lib/frontend/templates/views/shared/pagination.mustache diff --git a/app/lib/frontend/templates/views/uploader_approval.mustache b/app/lib/frontend/templates/views/uploader_approval.mustache deleted file mode 100644 index 65ea83ba29..0000000000 --- a/app/lib/frontend/templates/views/uploader_approval.mustache +++ /dev/null @@ -1,23 +0,0 @@ -{{! Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file - for details. All rights reserved. Use of this source code is governed by a - BSD-style license that can be found in the LICENSE file. }} - -

Uploader invitation

- -

- {{invite_email}} has invited you to become an uploader of the - {{package}} package. - If you accept this invitation, you’ll be able to upload new versions of the - package to the Dart package site ({{& primary_host}}), - and your email will be listed as an uploader at - {{package}}. -

- -

- Authorize and Accept Invite -

- -

- Clicking on the above link will redirect to the Google account authorization. - On successful authorization you will be added to the uploaders of the package. -