Show external link icon in licenses list

The following discussion from !18934 (merged) should be addressed:

  • @pslaughter started a discussion:

    question (non-blocking): Since the license links send to an external host (and open a new tab), we might need to include the external icon next to them. Let's create a follow up issue for this.

    Screen_Shot_2019-12-09_at_9.08.39_AM

    diff --git a/ee/app/assets/javascripts/project_licenses/components/licenses_table_row.vue b/ee/app/assets/javascripts/project_licenses/components/licenses_table_row.vue
    index 2b1a94e2936..c5c94ad69bc 100644
    --- a/ee/app/assets/javascripts/project_licenses/components/licenses_table_row.vue
    +++ b/ee/app/assets/javascripts/project_licenses/components/licenses_table_row.vue
    @@ -1,5 +1,5 @@
     <script>
    -import { GlLink, GlSkeletonLoading } from '@gitlab/ui';
    +import { GlLink, GlSkeletonLoading, GlIcon } from '@gitlab/ui';
     import LicenseComponentLinks from './license_component_links.vue';
     
     export default {
    @@ -8,6 +8,7 @@ export default {
         LicenseComponentLinks,
         GlLink,
         GlSkeletonLoading,
    +    GlIcon,
       },
       props: {
         license: {
    @@ -39,9 +40,9 @@ export default {
               {{ s__('Licenses|Name') }}
             </div>
             <div class="table-mobile-content">
    -          <gl-link v-if="license.url" :href="license.url" target="_blank">{{
    -            license.name
    -          }}</gl-link>
    +          <gl-link v-if="license.url" :href="license.url" target="_blank"
    +            >{{ license.name }} <gl-icon name="external-link"></gl-icon
    +          ></gl-link>
               <template v-else>{{ license.name }}</template>
             </div>
           </div>
    
Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading