<!--
  All linkId atributes of link elements must not contain spaces!
  Reason: linkIds are used for window names for pop-ups. See JRA-12387 for more details.
-->
<atlassian-plugin name='User Profile Links' key='jira.webfragments.user.profile.links'
                  i18n-name-key="webfragments.user.profile.links.plugin.name" system='true'>
    <plugin-info>
        <description key="webfragments.user.navigation.bar.plugin.desc">This library includes the web fragments for the
            left hand user profile links. This should not be disabled
        </description>
        <vendor name="Atlassian Pty Ltd" url="http://www.atlassian.com"/>
        <application-version min="3.12" max="3.12"/>
        <version>1.0</version>
    </plugin-info>

    <web-item key="user_profile_personal_roadmap" name="Personal Roadmap" section="system.user.profile.links/reports"
              i18n-name-key="webfragments.user.profile.reports.item.personal.roadmap.name" system="true" weight="10">
        <label key="user.personalroadmap"/>
        <tooltip key=""/>
        <link linkId="view_personalroadmap">/secure/BrowsePersonalProject.jspa</link>
        <param name="actionName">PersonalBrowser</param>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
    </web-item>

    <web-item key="user_profile_votes" name="Votes" section="system.user.profile.links/reports"
              i18n-name-key="webfragments.user.profile.reports.item.votes.name" system="true" weight="20">
        <label key="user.yourvotes"/>
        <tooltip key=""/>
        <link linkId="view_votes">/secure/UserVotes!default.jspa</link>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.VotingEnabledCondition"/>
    </web-item>

    <web-item key="user_profile_watches" name="Watches" section="system.user.profile.links/reports"
              i18n-name-key="webfragments.user.profile.reports.item.watches.name" system="true" weight="30">
        <label key="user.yourwatches"/>
        <tooltip key=""/>
        <link linkId="view_watches">/secure/UserWatches!default.jspa</link>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.WatchingEnabledCondition"/>
    </web-item>

    <web-item key="user_profile_administer_user" name="Administer User" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.admin.user.name" system="true" weight="10">
        <label key="common.concepts.administer.user"/>
        <tooltip key=""/>
        <link linkId="admin_user">/secure/admin/user/ViewUser.jspa</link>
        <param name="includeUser">true</param>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition"/>
    </web-item>

    <web-item key="user_profile_view_project_roles" name="View User Project Roles"
              section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.view.project.roles.name" system="true" weight="20">
        <label key="admin.viewuser.view.project.roles"/>
        <tooltip key=""/>
        <link linkId="view_project_roles">/secure/admin/ViewUserProjectRoles!default.jspa</link>
        <param name="includeUser">true</param>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsAdminCondition"/>
    </web-item>

    <web-item key="user_profile_change_password" name="Change Password" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.change.password.name" system="true" weight="30">
        <label key="common.concepts.changepassword"/>
        <tooltip key=""/>
        <link linkId="view_change_password">/secure/ChangePassword!default.jspa</link>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.ExternalPasswordManagementDisabledCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.ExternalUserManagementDisabledCondition"/>
    </web-item>

    <web-item key="user_profile_dashboard_config" name="Dashboard Configuration"
              section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.dashboard.config" system="true" weight="40">
        <label key="user.dashboardconfig"/>
        <tooltip key=""/>
        <link linkId="view_dashboard_config">/secure/SetupPortal.jspa</link>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
    </web-item>

    <web-item key="user_profile_manage_filters" name="Manage Filters" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.manage.filters" system="true" weight="50">
        <label key="common.concepts.managefilters"/>
        <tooltip key=""/>
        <link linkId="view_manage_filters">/secure/ManageFilters.jspa</link>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
    </web-item>

    <web-item key="user_profile_nav_columns" name="Navigator Columns" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.nav.columns" system="true" weight="60">
        <label key="common.concepts.navigatorColumns"/>
        <tooltip key=""/>
        <link linkId="view_nav_columns">/secure/ViewUserIssueColumns!default.jspa</link>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
    </web-item>

    <web-item key="user_profile_view_prefs" name="View Preferences" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.view.prefs" system="true" weight="70">
        <label key="user.viewpreferences"/>
        <tooltip key=""/>
        <link linkId="view_user_prefs">/secure/ViewUserPreferences.jspa</link>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
    </web-item>

    <web-item key="user_profile_edit_prefs" name="Edit Preferences" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.edit.prefs" system="true" weight="80">
        <label key="preferences.edit"/>
        <tooltip key=""/>
        <link linkId="view_edit_prefs">/secure/UpdateUserPreferences!default.jspa</link>
        <param name="indent">true</param>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
    </web-item>

    <web-item key="user_profile_view_profile" name="View Profile" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.view.profile" system="true" weight="90">
        <label key="user.viewyourprofile"/>
        <tooltip key=""/>
        <link linkId="view_profile">/secure/ViewProfile.jspa</link>
        <param name="showLinkWhenNotMe">true</param>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
    </web-item>

    <web-item key="user_profile_edit_profile" name="Edit Profile" section="system.user.profile.links/operations"
              i18n-name-key="webfragments.user.profile.links.item.edit.profile" system="true" weight="100">
        <label key="user.editprofile"/>
        <tooltip key=""/>
        <link linkId="view_edit_profile">/secure/EditProfile!default.jspa</link>
        <param name="indent">true</param>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserLoggedInCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsTheLoggedInUserCondition"/>
        <condition class="com.atlassian.jira.plugin.webfragment.conditions.ExternalUserManagementDisabledCondition"/>
    </web-item>

</atlassian-plugin>