超链接配置器

名称:超链接配置器

描述:通过参数配置在对象上创建超链接操作活动

版本:1.0.2

发布:2019-03-19

代码:combodo-custom-hyperlinks

扩散:客户商店, iTop Hub

创建超链接按钮,可通过可配置的URL从iTop中的一个对象跳转到另一应用,而无需编写任何代码。

特征

  • 超链接,标签,工具提示和图标是可配置的
  • 范围选项使仅在符合特定规则的对象上显示超链接成为可能
  • 链接的目标也是可配置的(默认情况下,_blank可在另一个选项卡窗口中打开链接)
  • contexts选项指定链接在门户的后台办公室(控制台)和Dor中是否可用(如果有多个,则在门户中)。
  • 动作按钮可以限于具有allowed_profiles中的至少一个的用户。

修订记录

版本发布日期注释
1.0.22019-03-19使用范围将其添加到门户对象上
添加“ allowed_profiles)”参数
1.0.12019-03-15添加“工具提示”和“上下文”参数
1.0.02019-02-07第一个版本

局限性

  • 按钮标签无法本地化(它们不是字典条目)

要求

iTop 2.3.0或更高版本

安装

通过iTop Hub或ITSM Designer进行部署

配置

对于每个要显示的“链接”,以下参数配置可用:

参数强制性的吗?含义
label如果没有图标,则为必需按钮的标签维基百科
url强制性的跳至的超链接https://www.wikipedia.org/wiki/$this->first_name$_$this->name$ 
target可选的在何处显示url结果_blank用于新窗口默认值,_top用于当前窗口_blank
scope可选的OQL查询到过滤器,在XQ118201上显示此链接

SELECT Contact WHERE org_id = 2

icon可选的真棒字体4.7图标代码Wikipedia
tooltip可选的在项目上显示的工具提示标签。默认值:无工具提示跳转到维基百科
contexts可选的如果指定,将在其中启用此链接的门户的逗号分隔列表。将backoffice办公室用于iTop控制台。如果未指定,则在所有上下文中都可用backoffice,itop-portal
allowed_profiles可选的如果指定,则启用该链接的iTop简档(角色)的逗号分隔列表。如果未指定,则允许所有简档(角色)。Support Agent,Configuration Manager

如果没有针对您的环境和需求的适当配置,此扩展将不会带来非常有用的链接。

'combodo-custom-hyperlinks' =>  (
   'hyperlinks' =>  (
      'Person' =>  (
         'linkedin_me' =>  (
            'label' => 'Linkedin Me!',
            'url' => 'https://www.linkedin.com/search/results/all/?keywords=$this->friendlyname$',
            'scope' => 'SELECT Contact WHERE org_id_friendlyname=\'demo\'',
            'icon' => 'linkedin',
         ),
      ),
      'Location' =>  (
         'maps_me' =>  (
            'label' => 'GoogleMaps Me!',
            'url' => 'https://www.google.com/maps/search/$this->address$+$this->postal_code$+$this->city$+$this->country$',
            'scope' => 'SELECT Location WHERE org_id_friendlyname=\'demo\'',
            'icon' => 'globe',
         ),
      ),
   ),
),

还可以通过在配置参数“linkedin_me”)中指定其UID,将超链接显示为按钮(“ 其他操作活动…”菜单旁边)。

图标使用“真棒字体”字体显示(已经包含在iTop中)。因此,要使用的图标代码是真棒字体4.7码 

用法

只需单击按钮!

https://www.itophub.io/wiki/media?w=600&tok=c20509&media=extensions%3Ahyperlinks-configurator-linkedin.png

https://www.itophub.io/wiki/media?w=600&tok=b66b09&media=extensions%3Ahyperlinks-configurator-googlemaps.png

原文:https://www.itophub.io/wiki/page?id=extensions%3Acombodo-custom-hyperlinks

Hyperlinks configurator

name:
Hyperlinks configurator
description:
Create custom hyperlinks on objects' details, by configuration
version:
1.0.2
release:
2019-03-19
code:
combodo-custom-hyperlinks
state:
stable
diffusion:
Client Store, iTop Hub

Create hyperlink buttons to jump from one object in iTop into another application, via configurable URLs, without writing a single line of code.

Features

  • Hyperlink, label, tooltip and icon are configurable

  • The scope option makes it possible to display the hyperlink only on objects matching a specific rule

  • The target of the link is configurable as well (by default _blank to open the link in another tab/window)

  • The contexts option specifies if the link is available in the backoffice (console) and/or in the portal(s) (and in which portal if there are several of them).

  • The action/button can be limited to users having at least one of the allowed_profiles.

Revision History

VersionRelease DateComments
1.0.22019-03-19Add it on Portal objects with scope
Add “allowed_profiles” parameter
1.0.12019-03-15Addition of the “tooltip” and “contexts” parameters
1.0.02019-02-07First version

Limitations

  • Button labels cannot be localized (they are not dictionary entries)

Requirements

iTop 2.3.0 or newer

Installation

Deploy it via iTop Hub or ITSM Designer

Configuration

For each “link” to be displayed, the following configuration parameters are available:

ParameterMandatory?MeaningExample
labelmandatory if no iconThe label of the button/linkWikipedia
urlmandatoryThe hyperlink to jump tohttps://www.wikipedia.org/wiki/$this->first_name$_$this->name$
targetoptionalwhere to display the url result _blank for a new window default, _top for the current window_blank
scopeoptionalAn OQL query to filter on which object to display this linkSELECT Contact WHERE org_id = 2
iconoptionalA Font Awesome 4.7 icon codewikipedia
tooltipoptionalThe label of a tooltip to display on the item.default: no tooltipJump to Wikipedia
contextsoptionalIf specified, a comma separated list of portals in which to enabled this link. Use backoffice for the iTop console. If not specified, it's available in all contextsbackoffice,itop-portal
allowed_profilesoptionalIf specified, a comma separated list of iTop Profiles for which to enable this link. If not specified, all profiles are allowed.Support Agent,Configuration Manager

This extension does not bring very useful links without a proper configuration specific to your environment and needs

'combodo-custom-hyperlinks' =>  (
   'hyperlinks' =>  (
      'Person' =>  (
         'linkedin_me' =>  (
            'label' => 'Linkedin Me!',
            'url' => 'https://www.linkedin.com/search/results/all/?keywords=$this->friendlyname$',
            'scope' => 'SELECT Contact WHERE org_id_friendlyname=\'demo\'',
            'icon' => 'linkedin',
         ),
      ),
      'Location' =>  (
         'maps_me' =>  (
            'label' => 'GoogleMaps Me!',
            'url' => 'https://www.google.com/maps/search/$this->address$+$this->postal_code$+$this->city$+$this->country$',
            'scope' => 'SELECT Location WHERE org_id_friendlyname=\'demo\'',
            'icon' => 'globe',
         ),
      ),
   ),
),

You can also display the hyperlink as a button (next to the “Other actions…” menu) by specifying in the configuration parameter 'shortcut_actions' its UID (in the above LinkedIn example the UID is “linkedin_me”)

The icons are displayed using the Font Awesome font (already included in iTop). Therefore the icon codes to use are the Font Awesome 4.7 codes

Usage

Just click on the button(s) !https://www.itophub.io/wiki/media?w=600&tok=c20509&media=extensions%3Ahyperlinks-configurator-linkedin.pnghttps://www.itophub.io/wiki/media?w=600&tok=b66b09&media=extensions%3Ahyperlinks-configurator-googlemaps.png

标签:
由 superadmin 在 2020/08/27, 16:08 创建
    

需要帮助?

如果您需要有关XWiki的帮助,可以联系:

深圳市艾拓先锋企业管理咨询有限公司