Wiki » Redmine-TW Resources » Plugins »
Additionals¶
Additionals 插件提供了自訂化 Redmine 的相關功能,額外提供許多有用的 Wiki 巨集指令,並充當 Alphanodes 相關插件的共用函式庫。
Author: Alphanodes
Authorize: Free
Latest Version: 3.2.0 | Download
Compatible with: Redmine 5.X
SCM or Website: https://github.com/alphanodes/additionals
Changelog
測試環境¶
- Redmine 5.0.6
- Additionals 3.1.0
效果¶
支持首頁的自訂化儀表板頁面(拖曳方式)
支持專案概覽的自訂化儀表板頁面(拖曳方式)
登入頁、全域頁腳的內容配置
全域側邊欄的內容配置
自定義創建新議題時的提醒通知
支持 Emoji 與表情符號
Wiki 巨集指令
- iframe
- vimeo
- youtube
- 更多巨集指令...更多巨集指令...
hello_world
Sample macro.
macro_list
Displays a list of all available macros, including description if available.
child_pages
Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples: {{child_pages}} -- can be used from a wiki page only {{child_pages(depth=2)}} -- display 2 levels nesting only {{child_pages(Foo)}} -- lists all children of page Foo {{child_pages(Foo, parent=1)}} -- same as above with a link to page Foo
include
Includes a wiki page. Examples: {{include(Foo)}} {{include(projectname:Foo)}} -- to include a page of a specific project wiki
collapse
Inserts of collapsed block of text. Examples: {{collapse This is a block of text that is collapsed by default. It can be expanded by clicking a link. }} {{collapse(View details...) With custom link text. }}
thumbnail
Displays a clickable thumbnail of an attached image. Default size is 200 pixels. Examples: {{thumbnail(image.png)}} {{thumbnail(image.png, size=300, title=Thumbnail)}} -- with custom title and size
issue
Displays an issue link including additional information. Examples: {{issue(123)}} -- Issue #123: Enhance macro capabilities {{issue(123, project=true)}} -- Andromeda - Issue #123: Enhance macro capabilities {{issue(123, tracker=false)}} -- #123: Enhance macro capabilities {{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123
asciinema
Graphical application developers often use screencasts to demonstrate functions of their programs. Syntax: {{asciinema(cast_id)}} Parameters: cast_id (string) – asciinema.org asciicast id Scope: This macro works in all text fields with formatting support. Examples: show asciinema.org cast_id 113463 {{asciinema(113463)}}
cryptocompare
Show CryptoCompare information. Syntax: {{cryptocompare(options)}} Parameters: :param string fsym: default BTC :param string tsym: default EUR :param string fsyms: default BTC,ETH,LTC (if supported by widget type) :param string tsyms: default EUR,USD (if supported by widget type) :param string period: (if supported by widget type) * 1D = 1 day (default) * 1W = 1 week * 2W = 2 weeks * 1M = 1 month * 3M = 3 months * 6M = 6 months * 1Y = 1 year :param string type: widget type has to be one of * advanced * chart (default) * converter * header * header_v2 * header_v3 * historical * list * news * summary * tabbed * titles Examples: Show `header_v3` widget type for crypto currencies `BTC` and `ETH`: {{cryptocompare(fsyms=BTC;ETH, type=header_v3)}}
date
Display current date. Syntax: {{date([TYPE])}} TYPE - current_date current date (default) - current_date_with_time current date with time - current_year current year - current_month current month - current_day current day - current_hour current hour - current_minute current minute - current_weekday current weekday - current_weeknumber current week number (1 - 52) The week starts with Monday - YYYY-MM-DD e.g. 2018-12-24, which will formated with Redmine date format Examples: {{date}} ...show current date {{date(current_year)}} ...show current year {{date(current_month)}} ...show current month {{date(current_weeknumber)}} ...show current week number
fa
Show Font Awesome icon. Syntax: {{fa(ICON [, class=CLASS, title=TITLE, text=TEXT size=SIZE, color=COLOR)}} ICON of fontawesome icon, eg. fa-adjust CLASS = additional css classes TITLE = mouseover title TEXT = Text to show LINK = Link icon and text (if specified) to this URL COLOR = css color code Examples: {{fa(adjust)}} ...show fontawesome icon "fas fa-adjust" {{fa(adjust, class=fa-inverse)}} ...show fontawesome icon "fas fa-stack" and inverse {{fa(adjust, size=4x)}} ...show fontawesome icon "fas fa-adjust" with size 4x {{fa(fas_adjust, title=Show icon)}} ...show fontawesome icon "fas fa-adjust" with title "Show icon" {{fa(fab_angellist)}} ...Show fontawesome icon "fab fa-angellist" {{fa(adjust, link=https=//www.redmine.org))}} ...Show fontawesome icon "fas fa-adjust" and link it to https://www.redmine.org {{fa(adjust, link=https=//www.redmine.de, name=Go to Redmine.org))}} ...Show fontawesome icon "fas fa-adjust" with name "Go to Redmine.org" and link it to https://www.redmine.org
gist
Embet GitHub gist Syntax: {{gist(gist)}} Parameters: :param string gist: gist to display. With or without Github username. Examples: {{gist(6737338)}} - show Github gist ``6737338`` (without user name) {{gist(plentz/6737338)}} - Show Github gist ``plentz/6737338`` (with user name)
gmap
Display a google map. Examples: Syntax: {{gmap([q=QUERY, mode=MODE, width=216, height=368])}} Parameters: :param string q: query, e.g. a city or location :param string mode: place, directions, search, view oder streetview (default: search) :param int width: widget width :param int height: widget height Examples: {{gmap(Munich)}} Google maps with Munich {{gmap(mode=directions, origin=Munich+Rosenheimerstr, destination=Arco)}} Direction from Munich to Arco
google_docs
Google docs macro to include Google documents. Syntax: {{google_docs(<link> [, width=100%, height=485, edit_link=LINK)}} Parameters: :param string link: Embedded Google docs link :param int width: width (if not specified, 100% is used) :param int height: height (if not specified, 485 is used) :param int edit_link: Link to edit page Examples: {{google_docs(https://docs.google.com/spreadsheets/d/e/2PACX-1vQL__Vgu0Y0f-P__GJ9kpUmQ0S-HG56ni_b-x4WpWxzGIGXh3X6A587SeqvJDpH42rDmWVZoUN07VGE/pubhtml)} {{google_docs(https://docs.google.com/spreadsheets/d/e/2PACX-1vQL__Vgu0Y0f-P__GJ9kpUmQ0S-HG56ni_b-x4WpWxzGIGXh3X6A587SeqvJDpH42rDmWVZoUN07VGE/pubhtml, width=514, height=422)}
group_users
List users of a user group (according the respective permissions) Syntax: {{group_users(GROUP_NAME}} Examples: {{group_users(Team A)}} - list users of group "Team A"
iframe
Include an Iframe into Redmine. If your Redmine is running with HTTPS, only iframes with HTTPS are accepted by this macro. Syntax: {{iframe(<url> [, width=100%, height=485)}} Parameters: :param string url: URL to website :param int width: width (default is 100%) :param int height: height (default is 485) :param bool with_link: true or false (if link to url should be displayed below iframe) Examples: show iframe of URL https://www.google.com/ {{iframe(https://www.google.com/)}} show iframe of URL https://www.google.com/ and show link to it {{iframe(https://www.google.com/, with_link: true)}}
last_updated_at
Displays date of last update of a wiki page. Syntax: {{last_updated_at([<project_name or project_identifier>, wiki_page])}} Scope: This macro only works in wiki page contexts.
last_updated_by
Displays a user who updated the page. Syntax: {{last_updated_by}} Scope: This macro only works in wiki page contexts.
members
Display members. Syntax: {{members([PROJECT_NAME, title=My members list, role=ROLE, with_sum=BOOL)]}} PROJECT_NAME can be project identifier, project name or project id Parameters: :param string project_name: can be project identifier, project name or project id :param string title: title to use for member list :param string role: only list members with this role. If you want to use multiple roles as filters, you have to use a | as separator. :param bool with_sum: show amount of members. Examples: {{members}} ...List all members for all projects (with the current user permission) {{members(with_sum=true)}} ...List all members for all projects and show title with amount of members {{members(the-identifier)}} ...A box showing all members for the project with the identifier of 'the-identifier' {{members(the-identifier, role=Manager)}} ...A box showing all members for the project with the identifier of 'the-identifier', which have the role "Manager" {{members(the-identifier, title=My user list)}} ...A box showing all members for the project with the identifier of 'the-identifier' and with box title "My user list"
meteoblue
Display current weather from meteoblue service. Syntax: {{meteoblue(<location> [, days=INT, width=216, height=368, color=BOOL])}} Params: :param string location: Weather location, e.g. münchen_deutschland_2867714. This is the part after https://www.meteoblue.com/en/weather/forecast/week/ :param int width: widget width :param int height: widget height :param bool color: color or monochrome :param bool pictoicon: pictoicon :param bool maxtemperature: maxtemperature :param bool mintemperature: mintemperature :param bool windspeed: windspeed :param bool windgust: windgust :param bool winddirection: winddirection :param bool uv: uv :param bool humidity: humidity :param bool precipitation: precipitation :param bool precipitationprobability: precipitationprobability :param bool spot: spot Examples: {{meteoblue(münchen_deutschland_2867714)}} weather for Munich {{meteoblue(münchen_deutschland_2867714, days=6, color=false)}} weather for Munich of the next 6 days without color
new_issue
Create a link for "New issue" for the current user. Syntax: {{new_issue([PROJECT_NAME, name=Custom name]}} PROJECT_NAME can be project identifier, project name or project id. If no PROJECT_NAME is specified, first project is used, which the current user has permission to create an issue. Parameters: :param string project_name: can be project identifier, project name or project id If no project_name is specified, first project is used, which the current user has permission to create an issue. :param string name: name to use for link. If not specified, "New issue" is used. You can use all language as suffix, eg. name_de, name_it, button_es Examples: Link to create new issue in first available project: {{new_issue}} Link to create new issue in project with the identifier of 'the-identifier': {{new_issue(the-identifier)}} Link to create new issue in project with the identifier of 'the-identifier' and the name 'New issue for broken displays' {{new_issue(the-identifier, title=New issue for broken displays)}}
projects
List projects. Syntax: {{projects([title=My project list, with_create_issue=BOOL])}} Examples: {{projects}} ...List all project, which I am member of {{projects(title=My project list)}} ...List all project with title "My project list", which I am member of {{projects(with_create_issue=true)}} ...List all project with link to create new issue, which I am member of
recently_updated
Displays a list of wiki pages that were updated recently. Syntax: {{recently_updated([days])}} Scope: This macro only works in wiki page contexts. Examples: {{recently_updated}} - List last updated pages (of the last 5 days) {{recently_updated(15)}} - List last updated pages of the last 15 days
reddit
Creates link to reddit. {{reddit(<subject or user name>)}} Examples: {{reddit(redmine)}} or {{reddit(r/redmine)}} - Show link to reddit subject `r/redmine` {{reddit(u/redmine)}} - Show link to reddit user profile `u/redmine`
redmine_issue
Link to a redmine.org issue Syntax: {{redmine_issue(id or url [, title=TITLE])}} Parameters: :param string id: issue id from redmine.org :param string url: this can be an absolute path to an redmine.org issue or an issue id :param string title: title of link to display Examples: Link to redmine.org issue with issue id: {{redmine_issue(1333)}} Link to redmine.org issue with issue id and anchor: {{redmine_issue(1333#note-6)}} Link to redmine.org issue with absolute url: {{redmine_issue(http://www.redmine.org/issues/12066)}}
redmine_wiki
Link to redmine.org wiki page Syntax: {{redmine_wiki(url [, name=NAME, title=TITLE])}} Parameters: :param string url: this can be an absolute path to an redmine.org issue or an issue id :param string name: name to display for link, if not specified, wiki page name is used :param string title: title of link to display Examples: Link to redmine.org wiki page with page name: {{redmine_wiki(RedmineInstall)}} Link to redmine.org wiki page with page name and anchor: {{redmine_wiki(FAQ#How-do-I-create-sub-pages-parentchild-relationships-in-the-wiki)}} Link to redmine.org wiki page with absolute url: {{redmine_wiki(https://www.redmine.org/projects/redmine/wiki/RedmineInstall)}}
slideshare
Slideshare macro to include Slideshare slide. Syntax: {{slideshare(<key> [, width=595, height=485, slide=SLIDE])}} Parameters: :param string key: Slideshare embedded key code, e.g. 57941706. This is the part is the last number in url: http://de.slideshare.net/AnimeshSingh/caps-whats-best-for-deploying-and-managing-openstack-chef-vs-ansible-vs-puppet-vs-salt-57941706 :param int width: width :param int height: height :param int slide: Slide page Examples: {{slideshare(57941706)}} show slideshare slide with default size 595x485 {{slideshare(57941706, width=514, height=422)}} show slide with user defined size {{slideshare(57941706, slide=5)}} start with slide (page) 5
tradingview
Creates Tradingview chart Syntax: {{tradingview(options)}} Parameters: :param int width: default 640 :param int height: default 480 :param string symbol: default NASDAQ:AAPL :param string interval: default W :param string timezone: default Europe/Berlin :param string theme: default White :param int style: default 2 :param string locale: default de :param string toolbar_bg: default #f1f3f6 :param bool enable_publishing: default false :param bool allow_symbol_change: default true :param bool hideideasbutton: default true Examples: {{tradingview(symbol=NASDAQ:AMZN, locale=en)}} - Show chart with symbol `NASDAQ:AMZN` and use English locale
twitter
Creates link to twitter account page or topic. Syntax: {{twitter(name)}} Parameters: :param string profile: Twitter profile name with @. E.g. alphanodes Examples: {{twitter(alphanodes)}} - Show link to twitter profile `@alphanodes` {{twitter(#redmine)}} - Show link to hashtag `#redmine`
user
Display link to user profile Syntax: {{user(USER_NAME [, format=USER_FORMAT, text=BOOL], avatar=BOOL])}} USER_NAME can be user id or user name (login name) USER_FORMATS - system (use system settings) (default) - firstname_lastname - firstname_lastinitial - firstinitial_lastname - firstname - lastname_firstname - lastnamefirstname - lastname_comma_firstname - lastname - username Examples: {{user(1)}} ...Link to user with user id 1 {{user(1, avatar=true)}} ...Link to user with user id 1 with avatar {{user(current_user, text=true)}} ...Show only user (without link) of the current user {{user(admin)}} ...Link to user with username 'admin' {{user(admin, format=firstname)}} ...Link to user with username 'admin' and show firstname as link text
vimeo
Vimeo macro to include vimeo video. Syntax: {{vimeo(<video key> [, width=640, height=360, autoplay=BOOL])}} Examples: {{vimeo(142849533)}} show video with default size 640x360 {{vimeo(142849533, width=853, height=480)}} show video with user defined size {{vimeo(142849533, autoplay=true)}} autoplay video
youtube
Youtube macro to include youtube video. Syntax: {{youtube(<video key> [, width=640, height=360, autoplay=BOOL])}} Examples: {{youtube(KMU0tzLwhbE)}} show video with default size 640x360 {{youtube(KMU0tzLwhbE, width=853, height=480)}} show video with user defined size {{youtube(KMU0tzLwhbE, autoplay=true)}} autoplay video
以下插件均需依賴 additional plugin
- additional_tags
- redmine_automation
- redmine_db
- redmine_devops
- redmine_hedgedoc
- redmine_hrm
- redmine_omniauth_saml
- redmine_passwords
- redmine_issue_view_columns
- redmine_privacy_terms
- redmine_reporting
- redmine_servicedesk
- redmine_sudo
- redmine_wki_guide
插件資訊¶
安裝步驟¶
- 將 additionals 目錄上傳至 /plugins 中
- 在 redmine 根目錄中執行
bundle install
- 在 redmine 根目錄中執行
bundle config set --local without 'development test'
- 在 redmine 根目錄中執行
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
- 重啟 Redmine 實例讓插件生效
回到頁首