{namespace JIRA.Templates.Project.Browse} /** * Browse projects page. * * @param operationLinks links registered for browse projects page * @param infoPanelHtml web panel registered for browse project page * @param adminMode the page is rendered under administration * @param selectedCategory the project category that is selected at page load */ {template .page} {let $pageTitle} {if $adminMode} {if $selectedCategory == 'archived'} {getText('browse.projects.archived')} {else} {getText('alt.text.browseprojects')} {/if} {else} {getText('browseprojects.title')} {/if} {/let} {call aui.page.document} {param extraClasses}browse-projects{/param} {param headContent} {if $adminMode and $selectedCategory == 'all'} {/if} {/param} {param windowTitle}{$pageTitle}{/param} {param content} {call aui.page.pageHeader} {param content} {call aui.page.pageHeaderMain} {param content}

{$pageTitle}

{/param} {/call} {if $operationLinks} {call aui.page.pageHeaderActions} {param content} {foreach $link in $operationLinks} {$link.label} {/foreach} {/param} {/call} {/if} {/param} {/call} {call aui.page.pagePanel} {param id: 'browse-projects-page' /} {param content} {call aui.page.pagePanelNav} {param id: 'browse-projects-sidebar' /} {param content} {/param} {/call} {call aui.page.pagePanelContent} {param content} {$infoPanelHtml|noAutoescape}
{/param} {/call} {/param} {param extraAttributes: [ 'data-track-pageview': 'projects.browse.view' ] /} {/call} {/param} {/call} {/template} /** * Sidebar list of project types used to filter results * * @param items list of project types to display */ {template .projectTypesTabs} {/template} /** * Sidebar list of categories used to filter results * * @param items list of categories to display */ {template .tabs} {/template} /** * Header and filter form * * @param contains value of text filter * @param category chosen category * @param projectType chosen project type * @param isAdminMode is the page rendered inside administration or not (admin settings -> projects) */ {template .filter} // we do not have filters in admin projects list at the moment... sorry admins {if not $isAdminMode}

{if $projectType} {$projectType.formattedKey} - {/if}{$category.name}

{/if}
{/template} /** * Projects list. */ {template .projects}
{call .table data="all"}{/call}
{/template} /** * Projects table * @param isAdminMode user is in admin mode. (Project admins) * @param category current category * @param sortOrder * @param sortColumn */ {template .table} {call aui.table} {param theadContent} {getText('common.concepts.project')} {if $sortColumn == 'name'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {getText('common.concepts.key')} {if $sortColumn == 'key'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {getText('browseprojects.project.type')} {if $sortColumn == 'projectTypeName'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {getText('browseprojects.project.lead')} {if $sortColumn == 'lead'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {getText('browseprojects.project.category')} {if $sortColumn == 'projectCategoryId'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {if $category?.id == 'archived'} {getText('browseprojects.archived.date')} {if $sortColumn == 'archivedTimestamp'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {if $isAdminMode} {getText('browseprojects.archived.by')} {if $sortColumn == 'archivedBy'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {/if} {/if} {if $category?.id != 'archived' and $isAdminMode} {getText('browseprojects.updated.date')} {if $sortColumn == 'lastUpdatedTimestamp'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {getText('browseprojects.issue.count')} {if $sortColumn == 'issueCount'} {call .renderSortIcon} {param sortOrder: $sortOrder /} {/call} {/if} {/if} {if not $isAdminMode} {getText('common.concepts.url')} {/if} {if $isAdminMode} {getText('common.words.actions')} {/if} {/param} {param contentIncludesTbody}true{/param} {param content} {/param} {/call} {/template} /** * Single project row. * * @param id project ID * @param key project key * @param hasDefaultAvatar does the project has default avatar * @param name project name * @param? lead name of the project lead * @param? leadProfileLink prerendered link to project lead profile * @param? archivedBy name of person who archived project * @param? archivedByLink prerendred link to archived by profile * @param? archivedDate date when project was archived * @param? url project URL * @param? projectCategoryId project category ID * @param? projectCategoryName project category name * @param? projectTypeIcon project type icon * @param? projectTypeName project type name * @param? archived project is archived or not * @param? admin user is admin * @param? projectAdmin user is project admin * @param isAdminMode is the page rendered inside administration or not (admin settings -> projects) * @param archivingEnabled is archiving feature enabled for this instance * @param? issueCount count of the issues in the project * @param? lastUpdatedDate last updated date of the project */ {template .projectRow} {let $avatarSize: 'small' /} {let $projectUrl: $isAdminMode ? '/plugins/servlet/project-config/' + $key + '/summary' : '/browse/' + $key /} {if not $archived}{/if} {call aui.avatar.avatar} {param isProject}true{/param} {param size}{$avatarSize}{/param} {param avatarImageUrl} {if ($hasDefaultAvatar)} {contextPath()}/secure/projectavatar?size={$avatarSize} {else} {contextPath()}/secure/projectavatar?size={$avatarSize}&pid={$id} {/if} {/param} {param extraClasses}jira-system-avatar{/param} {/call} {$name} {if not $archived}{/if} {$key} {if $projectTypeIcon} {/if} {if $lead} {$leadProfileLink|noAutoescape} {else} {getText('browse.projects.no.lead')} {/if} {if $projectCategoryId} {$projectCategoryName} {else} {getText('browse.projects.none')} {/if} {if $archived} {$archivedDate ?: '--'} {if $isAdminMode} {if $archivedBy} {$archivedByLink|noAutoescape} {else} {getText('browse.projects.no.archived.by')} {/if} {/if} {/if} {if (not $archived) and $isAdminMode} {$lastUpdatedDate ?: '--'} {$issueCount ?: '--'} {/if} {if not $isAdminMode} {if $url} {$url} {else} {getText('browse.projects.no.url')} {/if} {/if} {if $isAdminMode and ($admin or $projectAdmin)} {if not $archived} {call .projectActions data="all"}{/call} {else} {call .archivedProjectActions data="all"}{/call} {/if} {/if} {/template} /** * Actions for a project * @param id project ID * @param? archived project is archived or not * @param? admin user is admin * @param archivingEnabled is archiving feature enabled for this instance */ {template .projectActions private="true"}
{if $admin} // this will be specific to delete after archiving for PLA implementation {call aui.buttons.button} {param text: '' /} {param iconType: 'aui' /} {param iconClass: 'aui-icon-small aui-iconfont-more' /} {param iconText: 'More' /} {param type: 'subtle' /} {param id: 'dropdown2-trigger-' + $id /} {param dropdown2Target: 'dropdown2-more-' + $id /} {param extraClasses: 'aui-dropdown2-trigger-arrowless' /} {param extraAttributes: [ 'data-track-click': 'projects.browse.meatballs' ] /} {/call} {elseif not $archived} {call aui.buttons.button} {param text: getText('common.words.edit') /} {param type: 'link' /} {param href: contextPath() + '/secure/project/EditProject!default.jspa?pid=' + $id + '&returnUrl=/secure/project/BrowseProjects.jspa?s=view_projects' /} {param id: 'edit-project-' + $id /} {param extraClasses: 'trigger-dialog stacked-dialog edit-project' /} {/call} {/if}
{/template} /** * Actions for an archived project * @param id project ID * @param? admin user is admin * @param archivingEnabled is archiving feature enabled for this instance */ {template .archivedProjectActions private="true"} {if $admin} // this will be specific to delete after archiving for PLA implementation {call aui.buttons.button} {param text: '' /} {param iconType: 'aui' /} {param iconClass: 'aui-icon-small aui-iconfont-more' /} {param iconText: 'More' /} {param type: 'subtle' /} {param id: 'dropdown2-trigger-' + $id /} {param dropdown2Target: 'dropdown2-more-' + $id /} {param extraClasses: 'aui-dropdown2-trigger-arrowless' /} {/call} {/if} {/template} /** * No projects row, with some explanation text and a call to action * @param isAdmin if the logged in user is admin * @param headerText * @param descriptionText * @param callToActionText * @param projectType * @param? imageClassName */ {template .emptyRowWithCallToAction}
{if $imageClassName}
{/if}
{$headerText}

{$descriptionText}

{if $isAdmin}

{/if}
{/template} /** * Error page * * @param errorMessages */ {template .error} {call aui.page.document} {param windowTitle}{getText('common.words.error')}{/param} {param extraClasses: 'browse-project-error-page' /} {param content}
{switch $errorMessages[0]} {case getText('noprojects')} {getText('noprojects')} {case getText('noprojects.notloggedin')} {getText('noprojects.notloggedin')} {case getText('noprojects.nopermissions')} {getText('noprojects.nopermissions')} {case getText('noprojects.mustsetupfirst')} {getText('noprojects.mustsetupfirst')} {/switch}

{$errorMessages[0]}

{for $i in range(1, length($errorMessages))}

{$errorMessages[$i] |noAutoescape}

{/for}
{/param} {/call} {/template} /** * Empty screen displayed for archived projects list in browse projects app * * @param adminMode */ {template .archivedProjectsEmptyState private="true"}
{if not $adminMode}

{getText('browse.projects.archived')}

{/if}
{getText('noprojects')}
{if $adminMode}

{getText('browseproject.no.archived.projects.admin.title')}

{getText('browseproject.no.archived.projects.admin.description')}

{call aui.form.button} {param type: 'primary' /} {param href: 'BrowseProjects.jspa' /} {param text: getText('browseproject.no.archived.projects.admin.action') /} {/call}

{else}

{getText('browseproject.no.archived.projects.user.title')}

{getText('browseproject.no.archived.projects.user.description')}

{/if}
{/template} /** * Project restore successful flag content * * @param projectKey */ {template .restoreSuccessFlag}

{getText('browse.projects.restore.success')}

{call aui.buttons.button} {param text: getText('browse.projects.restore.success.link') /} {param type: 'link' /} {param href: contextPath() + '/secure/admin/IndexProject.jspa?key=' + $projectKey /} {/call} {/template} /** * Sort order icon. * @param sortOrder order of sorting */ {template .renderSortIcon} {call aui.icons.icon} {param useIconFont: true /} {param size: 'small' /} {param icon: $sortOrder == 'ascending' ? 'new-arrow-up' : 'new-arrow-down' /} {/call} {/template}