2
1
0
3 回答
- 321
以下のユーザーマクロ作成で解決しましたのでご連絡します。
マクロ本体の処理: レンダリングする
テンプレート:## @param PanelTitle:title=Panel Title|type=string ## @param MarginLeft:title=Param Margin Left|type=string ## @param BorderStyle:title=Border Style|type=string|desc=Examples: solid, dashed ## @param BorderColour:title=Border Colour|type=string ## @param BorderPixelWidth:title=Border Pixel Width (Value Only)|type=string ## @param BackgroundColour:title=Background Colour|type=string ## @param TitleBackgroundColour:title=Title Background Colour|type=string ## @param TitleTextColour:title=Title Text Colour|type=string #if (!$paramBorderPixelWidth) #set ($paramBorderPixelWidth="1px") #end #if ($paramMarginLeft) #set ($styleMarginLeft="margin-left: $paramMarginLeft;") #else #set ($styleMarginLeft="") #end #if ($paramBackgroundColour) #set ($styleBackgroundColour="background-color: $paramBackgroundColour;") #else #set ($styleBackgroundColour="") #end #if ($paramBorderColour) #set ($styleBorderColour="border-color: $paramBorderColour;") #set ($styleBorderBottomColour="border-bottom-color: $paramBorderColour;") #else #set ($styleBorderColour="") #set ($styleBorderBottomColour="") #end #if ($paramBorderStyle) #set ($styleBorderStyleForPanel="border-style: $paramBorderStyle;") #set ($styleBorderStyleForPanelHeader="border-bottom-style: $paramBorderStyle;") #else #set ($styleBorderStyleForPanel="") #set ($styleBorderStyleForPanelHeader="") #end #if ($paramBorderPixelWidth) #set ($styleBorderPixelWidthForPanel="border-width: $paramBorderPixelWidth;") #set ($styleBorderPixelWidthForPanelHeader="border-bottom-width: $paramBorderPixelWidth;") #else #set ($styleBorderPixelWidthForPanel="") #set ($styleBorderPixelWidthForPanelHeader="") #end #if ($paramTitleBackgroundColour) #set ($styleTitleBackgroundColour="background-color: $paramTitleBackgroundColour;") #elseif ($paramBackgroundColour) #set ($styleTitleBackgroundColour="background-color: $paramBackgroundColour;") #else #set ($styleTitleBackgroundColour="") #end #if ($paramTitleTextColour) #set ($styleTitleTextColour="color: $paramTitleTextColour;") #else #set ($styleTitleTextColour="") #end #if ($styleBackgroundColour == "") #set ($styleForPanelContent = "") #else #set ($styleForPanelContent = "style='$styleBackgroundColour'") #end <div class="panel" style="$styleBackgroundColour$styleBorderColour$styleBorderStyleForPanel$styleBorderPixelWidthForPanel$styleMarginLeft"> #if ($paramPanelTitle) <div class="panelHeader" style="$styleBorderPixelWidthForPanelHeader$styleBorderStyleForPanelHeader$styleBorderBottomColour$styleTitleBackgroundColour$styleTitleTextColour"> <b>$paramPanelTitle</b> </div> #end <div class="panelContent" $styleForPanelContent> <p>$body</p> </div> </div>
- パネル内の「Param Margin Left」に「50px」等を入力
- タイトルに絵文字を入力する場合は、タグで指定する。
例:<img class="emoticon" src="/wiki/images/icons/emoticons/add.png" height="16" width="16" align="absmiddle" alt="" border="0">
- Kengo Ohsaki
ユーザーマクロ使いこなしていますね!
コメントを追加... - 210
パネル マクロは下記でしょうか?
https://ja.confluence.atlassian.com/doc/panel-macro-51872380.html
上記ページで紹介している、Storage format example がマクロの中身になります。
例えば、panelのCSS設定を一々設定するのが面倒な場合に
予めデザインをカスタマイズされているパネルをユーザーマクロで用意しておくとすると...
下記のようなユーザーマクロですかね。
## Macro title: CustomizePanael ## Macro has a body: Y ## Body processing: ## Output: Selected output option ## ## Developed by: Kengo Ohsaki ## Date created: 2015/11/11 ## Installed by: Kengo Ohsaki ## @param Subject:title=タイトル|type=string|desc=タイトルを入力してください。 <ac:structured-macro ac:name="panel"> <ac:parameter ac:name="bgColor">#72bc72</ac:parameter> <ac:parameter ac:name="titleBGColor">#00a400</ac:parameter> <ac:parameter ac:name="title">$paramSubject</ac:parameter> <ac:parameter ac:name="borderStyle">dashed</ac:parameter> <ac:parameter ac:name="borderColor">blue</ac:parameter> <ac:parameter ac:name="titleColor">white</ac:parameter> <ac:rich-text-body> $body </ac:rich-text-body> </ac:structured-macro>
コメントを追加... - 10-1
ありがとうございます。
目的としては、パネルマクロを別途作成してPDFスタイルシートでインデント設定をしたいと考えています。
(https://jira.atlassian.com/browse/CONF-29767のワークアラウンド)以下の作業で「panel」はインデント30px、「panel60」はインデント60pxになることを期待したのですが、うまくいきません(両方ともインデント30pxとなる)。
1. ユーザーマクロを作成
2. PDFスタイルシートを設定
.panel { margin: 10px 0px 10px 30px; padding: 0px 0px 10px; } .panel60 { margin: 10px 0px 10px 60px; padding: 0px 0px 10px; }
※ソース
<ac:structured-macro ac:name="panel"> <ac:parameter ac:name="bgColor">#eeeeee</ac:parameter> <ac:parameter ac:name="title">(+) 補足</ac:parameter> <ac:parameter ac:name="borderColor">#91c89c</ac:parameter> <ac:parameter ac:name="borderWidth">0</ac:parameter> <ac:rich-text-body> ああああ</ac:rich-text-body> </ac:structured-macro> <p> <ac:structured-macro ac:name="panel60"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p>ああああ</p> </ac:rich-text-body> </ac:structured-macro> </p>
コメントを追加...
デフォルトにあるパネル以外に独自でパネルを作成したいのですがデフォルトのマクロの中身を確認することはできるのでしょうか?