Skip to content

chore: add helper text to help admins create new templates #3364

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 3 commits into from
Aug 3, 2022
Merged
Changes from 1 commit
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
Next Next commit
chore: add helper text to help admins create new templates
  • Loading branch information
bpmct committed Aug 3, 2022
commit 5b05b4b87b30650257da11a27b379d456601e937
20 changes: 19 additions & 1 deletion site/src/pages/TemplatesPage/TemplatesPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,25 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = (props) => {
</Stack>
</PageHeaderTitle>
{props.templates && props.templates.length > 0 && (
<PageHeaderSubtitle>Choose a template to create a new workspace.</PageHeaderSubtitle>
<>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be un-nested from the React fragment

<PageHeaderSubtitle>
Choose a template to create a new workspace
{props.canCreateTemplate ? (
<>
, or{" "}
<Link
href="https://coder.com/docs/coder-oss/latest/templates#add-a-template"
target="_blank"
>
create a new template
</Link>{" "}
from the CLI.
</>
) : (
"."
)}
</PageHeaderSubtitle>
</>
)}
</PageHeader>

Expand Down