pages

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package pages provides ForgeUI-based page templates for the organization plugin dashboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackLink(href, text string) g.Node

BackLink renders a back navigation link.

func Card

func Card(children ...g.Node) g.Node

Card creates a basic card container.

func CardWithHeader

func CardWithHeader(headerTitle string, headerActions []g.Node, body ...g.Node) g.Node

CardWithHeader creates a card with a header section.

func ConfirmButton

func ConfirmButton(formAction, method, text, confirmMessage, colorClass string, icon g.Node) g.Node

ConfirmButton creates a button that requires confirmation.

func ConfirmDialog

func ConfirmDialog(message, confirmButtonText, xShowVar, onConfirm string) g.Node

ConfirmDialog renders a confirmation dialog using Alpine.js.

func CreateOrganizationPage

func CreateOrganizationPage(currentApp *app.App, basePath string, errorMsg string) g.Node

CreateOrganizationPage renders the create organization form page.

func CreateTeamPage

func CreateTeamPage(currentApp *app.App, orgID, basePath string) g.Node

CreateTeamPage renders the create team form page.

func DangerButton

func DangerButton(onclick, text string, icon g.Node) g.Node

DangerButton creates a danger/destructive action button using ForgeUI.

func DataTable

func DataTable(headers []string, rows []g.Node) g.Node

DataTable renders a data table using ForgeUI.

func EditTeamPage

func EditTeamPage(currentApp *app.App, orgID, teamID, basePath string) g.Node

EditTeamPage renders the edit team form page.

func EmptyState

func EmptyState(icon g.Node, title, description string) g.Node

EmptyState renders an empty state message using ForgeUI.

func ErrorMessage

func ErrorMessage(xShowCondition string) g.Node

ErrorMessage renders an error message.

func FormField

func FormField(id, label, fieldType, name, placeholder string, required bool, helpText string) g.Node

FormField renders a form field with label and input using ForgeUI.

func FormatDate

func FormatDate(t time.Time) string

FormatDate formats a time.Time to a readable string.

func FormatDateTime

func FormatDateTime(t time.Time) string

FormatDateTime formats a time.Time to a readable string with time.

func FormatTimeAgo

func FormatTimeAgo(t time.Time) string

FormatTimeAgo returns a human-readable "time ago" string.

func IconButton

func IconButton(href string, icon g.Node, title, colorClass string) g.Node

IconButton creates a small icon button.

func InvitationsPage

func InvitationsPage(currentApp *app.App, orgID, basePath string) g.Node

InvitationsPage renders the organization invitations management page.

func LoadingSpinner

func LoadingSpinner() g.Node

LoadingSpinner renders a loading spinner.

func MembersPage

func MembersPage(currentApp *app.App, orgID, basePath string) g.Node

MembersPage renders the organization members management page.

func OrganizationDetailPage

func OrganizationDetailPage(currentApp *app.App, orgID, basePath string) g.Node

OrganizationDetailPage renders the organization detail/overview page.

func OrganizationSettingsPage

func OrganizationSettingsPage(currentApp *app.App, basePath string) g.Node

OrganizationSettingsPage renders the organization settings page with ForgeUI components.

func OrganizationsListPage

func OrganizationsListPage(currentApp *app.App, basePath string) g.Node

OrganizationsListPage renders the organizations list page with dynamic data loading.

func PageHeader(title, description string, actions ...g.Node) g.Node

PageHeader renders a standard page header with title, description, and optional actions.

func Pagination

func Pagination(currentPage, totalPages int, baseURL string) g.Node

Pagination renders pagination controls.

func PrimaryButton

func PrimaryButton(href, text string, icon g.Node) g.Node

PrimaryButton creates a primary action button using ForgeUI.

func QuickLinkCard

func QuickLinkCard(title, description, href string, icon g.Node) g.Node

QuickLinkCard renders a quick access card.

func RoleBadge

func RoleBadge(role string) g.Node

RoleBadge renders a badge for organization roles.

func RoleTemplateFormPage

func RoleTemplateFormPage(currentApp *app.App, templateID, basePath string, isEdit bool) g.Node

RoleTemplateFormPage renders the create/edit role template form page.

func RolesPage

func RolesPage(currentApp *app.App, orgID, basePath string) g.Node

RolesPage renders the organization roles management page.

func SearchInput

func SearchInput(placeholder, currentValue, formAction string) g.Node

SearchInput renders a search input field using ForgeUI.

func SecondaryButton

func SecondaryButton(href, text string, icon g.Node) g.Node

SecondaryButton creates a secondary action button using ForgeUI.

func SelectField

func SelectField(id, label, name string, required bool, options []SelectOption, helpText string) g.Node

SelectField renders a select dropdown field.

func StatsCard

func StatsCard(label, xDataValue, iconColor string) g.Node

StatsCard renders a statistics card with icon and value.

func StatusBadge

func StatusBadge(status string) g.Node

StatusBadge renders a badge for status (active, pending, etc.)

func StringPtr

func StringPtr(s string) *string

StringPtr returns a pointer to a string.

func TableCell

func TableCell(content g.Node) g.Node

TableCell creates a table cell using ForgeUI.

func TableCellActions

func TableCellActions(actions ...g.Node) g.Node

TableCellActions creates a table cell with action buttons.

func TableCellSecondary

func TableCellSecondary(content g.Node) g.Node

TableCellSecondary creates a secondary table cell with muted text.

func TableRow

func TableRow(cells ...g.Node) g.Node

TableRow creates a table row using ForgeUI.

func TeamsPage

func TeamsPage(currentApp *app.App, orgID, basePath string) g.Node

TeamsPage renders the organization teams management page.

func TextareaField

func TextareaField(id, label, name, placeholder string, rows int, required bool, helpText string) g.Node

TextareaField renders a textarea form field.

func UpdateOrganizationPage

func UpdateOrganizationPage(currentApp *app.App, orgID, basePath string) g.Node

UpdateOrganizationPage renders the update organization form page.

func XIDToString

func XIDToString(id xid.ID) string

XIDToString converts xid.ID to string safely.

Types

type SelectOption

type SelectOption struct {
	Value    string
	Label    string
	Selected bool
}

SelectOption represents an option for a select field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL