Asset Publisher

null ヒューレット・パッカード・エンタープライズ Hewlett Packard Enterprise|導入事例

テンプレート処理中にエラーが発生しました。
The following has evaluated to null or missing:
==> dlFileEntryType.getDDMStructures()?first  [in template "10155#10195#JA_RESOURCE_LIBRARY_RESOURCE" at line 23, column 22]

----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ddmStructure = dlFileEntryType.getDDM...  [in template "10155#10195#JA_RESOURCE_LIBRARY_RESOURCE" at line 23, column 7]
	- Reached through: #assign-container  [in template "10155#10195#JA_RESOURCE_LIBRARY_RESOURCE" at line 7, column 5]
----
1<#-- リファクタ済み7.2用テーマを使っているか判断するトリガー(移行作業完了後は不要なため削除する)  --> 
2<#assign seventwo_theme_enable = getterUtil.getBoolean(themeDisplay.getThemeSetting("seventwo-theme-enable")) /> 
3<#--  /リファクタ済み7.2用テーマを使っているか判断するトリガー(移行作業完了後は不要なため削除する)  --> 
4 
5<#if seventwo_theme_enable?? && seventwo_theme_enable == true > 
6  <#--  ↓↓↓データ以降作業完了後に残すコードここから↓↓↓  --> 
7    <#assign 
8      portlet_namespace = renderResponse.getNamespace() 
9      JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
10      article = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) 
11      serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() 
12      httpServletRequest = serviceContext.getRequest() 
13      themeDisplay = serviceContext.getThemeDisplay() 
14 
15      <#--  DLFileEntry related variables.  --> 
16      dLFileEntryLocalService         = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") 
17      dLFileEntryTypeLocalService     = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService") 
18      dLFileEntryMetadataLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryMetadataLocalService") 
19      storageEngine                   = serviceLocator.findService("com.liferay.dynamic.data.mapping.storage.StorageEngine") 
20      uuid = common_fields.dmAsset.getData()?keep_after_last("/")?keep_before("?") 
21      dlFileEntry = dLFileEntryLocalService.fetchDLFileEntryByUuidAndGroupId(uuid, groupId) 
22      dlFileEntryType = dLFileEntryTypeLocalService.getFileEntryType(dlFileEntry.getFileEntryTypeId()) 
23      ddmStructure = dlFileEntryType.getDDMStructures()?first 
24      dlFileEntryMetadata = dLFileEntryMetadataLocalService.getFileEntryMetadata(ddmStructure.getStructureId(), dlFileEntry.getFileVersion().getFileVersionId()) 
25      ddmFormFieldValuesMap = storageEngine.getDDMFormValues(dlFileEntryMetadata.getDDMStorageId()).getDDMFormFieldValuesMap() 
26 
27      <#--  Asset related variables.  --> 
28      asset_title = dlFileEntry.getTitle() 
29      asset_type = ddmFormFieldValuesMap['asset_type'][0].getValue().getString(locale)?remove_beginning('[\"')?remove_ending('\"]') 
30      asset_thumbnail = themeDisplay.getPortalURL() + common_fields.dmAsset.getData() + "&previewFileIndex=1" 
31      recent_conversion_type = ddmFormFieldValuesMap['recent_conversion_type'][0].getValue().getString(locale)?remove_beginning('[\"')?remove_ending('\"]') 
32      recent_asset_primary_buyer_stage = ddmFormFieldValuesMap['recent_asset_primary_buyer_stage'][0].getValue().getString(locale)?remove_beginning('[\"')?remove_ending('\"]') 
33 
34      <#--  GET parameters related variables.  --> 
35      recent_conversion_medium = paramUtil.getString(httpServletRequest, "utm_medium") 
36      recent_conversion_source = paramUtil.getString(httpServletRequest, "utm_source") 
37      recent_conversion_source_content = paramUtil.getString(httpServletRequest, "utm_content") 
38      recent_conversion_source_term = paramUtil.getString(httpServletRequest, "utm_term") 
39      campaign = paramUtil.getString(httpServletRequest, "utm_campaign") 
40      recent_asset_url = themeDisplay.getPortalURL() + common_fields.dmAsset.getData() + "&download=true" 
41      redirectUrl = themeDisplay.getPortalURL() + "/web/japan/resources/thank-you?asset_name=" + asset_title + "&asset_url=" + recent_asset_url 
42    /> 
43 
44    <#--  Macro for rendering HubSpot form. --> 
45    <#macro hs_form> 
46      <#-- 
47        - This form is associated to https://app.hubspot.com/forms/252686/6b6b3501-7e1d-426a-af18-3066d160314e/ 
48        - When you modified/updated the HubSpot form, don't forget to reflect the changes to this macro (form). 
49        - The reason why this macro is hard-coded and HubSpot embed code is not used 
50          are you need to send several data associated with DLFileEntry. 
51      --> 
52      <form id="hs-form" method="POST" action='https://forms.hubspot.com/uploads/form/v2/${common_fields.PortalID.getData()}/${common_fields.FormGUID.getData()}'> 
53        <div class="sheet-header"> 
54          <#--  Show thumbnail of asset's 1st page in case of Case Study.  --> 
55          <#if asset_type != "Case Study" > 
56            <div class="row justify-content-center"> 
57              <div class="col-6 col-md-5 col-lg-4 col-xl-8 my-3"> 
58                <img class="w-100 card" src="${htmlUtil.escapeAttribute(asset_thumbnail)}" alt="資料1ページ目のサムネイル"> 
59              </div> 
60            </div> 
61          </#if> 
62          <#--  /Show thumbnail of asset's 1st page in case of Case Study.  --> 
63          <div class="sheet-text"> 
64            以下のフォームに必要事項をご入力の上、<b><@liferay.language key="download" /></b>をクリックすると、資料ダウンロードがはじまります。 
65          </div> 
66        </div> 
67        <div class="sheet-section"> 
68          <div class="form-group-autofit"> 
69            <div class="form-group-item"> 
70              <#--  姓  --> 
71              <input name="last_name_characters" class="form-control" placeholder='<@liferay.language key="last-name" /> *' type="text" required /> 
72              <#--  /姓  --> 
73            </div> 
74            <div class="form-group-item"> 
75              <#--  名  --> 
76              <input name="first_name_characters" class="form-control" placeholder='<@liferay.language key="first-name" /> *' type="text" required /> 
77              <#--  /名  --> 
78            </div> 
79          </div> 
80          <div class="form-group-autofit"> 
81            <div class="form-group-item"> 
82              <#--  機社名  --> 
83              <input name="company_name_characters" class="form-control" placeholder="貴社名 *" type="text" required /> 
84              <#--  /機社名  --> 
85            </div> 
86          </div> 
87          <div class="form-group-autofit"> 
88            <div class="form-group-item"> 
89              <#--  部署名  --> 
90              <input name="japanese_department" class="form-control" placeholder="部署名 *" type="text" required /> 
91              <#--  /部署名  --> 
92            </div> 
93          </div> 
94          <div class="form-group-autofit"> 
95            <div class="form-group-item"> 
96              <#--  メールアドレス(勤務先)  --> 
97              <input name="email" class="form-control" placeholder='<@liferay.language key="email-address" />(勤務先) *'' type="email" required /> 
98              <#--  /メールアドレス(勤務先)  --> 
99            </div> 
100          </div> 
101          <div class="d-none"> 
102            <@liferay_aui.input useNamespace=false type="hidden" name="country" value="Japan" /> 
103            <@liferay_aui.input useNamespace=false type="hidden" name="asset_id" value="${htmlUtil.escapeAttribute(uuid)}" /> 
104            <@liferay_aui.input useNamespace=false type="hidden" name="asset_name" value="${htmlUtil.escapeAttribute(dlFileEntry.getTitle())}" /> 
105            <@liferay_aui.input useNamespace=false type="hidden" name="asset_type" value="${htmlUtil.escapeAttribute(asset_type)}" /> 
106            <@liferay_aui.input useNamespace=false type="hidden" name="recent_asset_primary_buyer_stage" value="${htmlUtil.escapeAttribute(recent_asset_primary_buyer_stage)}" /> 
107            <@liferay_aui.input useNamespace=false type="hidden" name="recent_conversion_type" value="${htmlUtil.escapeAttribute(recent_conversion_type)}" /> 
108            <@liferay_aui.input useNamespace=false type="hidden" name="recent_conversion_medium" value="${htmlUtil.escapeAttribute(recent_conversion_medium)}" /> 
109            <@liferay_aui.input useNamespace=false type="hidden" name="recent_conversion_source" value="${htmlUtil.escapeAttribute(recent_conversion_source)}" /> 
110            <@liferay_aui.input useNamespace=false type="hidden" name="recent_conversion_source_content" value="${htmlUtil.escapeAttribute(recent_conversion_source_content)}" /> 
111            <@liferay_aui.input useNamespace=false type="hidden" name="recent_conversion_source_term" value="${htmlUtil.escapeAttribute(recent_conversion_source_term)}" /> 
112            <@liferay_aui.input useNamespace=false type="hidden" name="recent_conversion_previous_page_seen" value="${htmlUtil.escapeAttribute(request.getHeader('REFERER')!)}" /> 
113            <@liferay_aui.input useNamespace=false type="hidden" name="asset_url" value="${recent_asset_url}" /> 
114            <@liferay_aui.input useNamespace=false type="hidden" name="campaign" value="${htmlUtil.escapeAttribute(campaign)}" /> 
115            <@liferay_aui.input useNamespace=false type="hidden" name="hs_context" value='{"redirectUrl": "${redirectUrl}", "ipAddress": "${htmlUtil.escapeAttribute(request.getRemoteAddr())}"}' /> 
116          </div> 
117        </div> 
118        <div class="sheet-footer sheet-footer-btn-block-sm-down mt-0"> 
119          <div class="btn-group"> 
120            <div class="btn-group-item"> 
121              <input class="btn btn-primary" type="submit" value='<@liferay.language key="download" />' /> 
122            </div> 
123          </div> 
124          <#--  Form validation  --> 
125          <@liferay_aui.script use="aui-form-validator"> 
126            var rules = { 
127              last_name_characters: { 
128                required: true 
129              }, 
130              first_name_characters: { 
131                required: true 
132              }, 
133              company_name_characters: { 
134                required: true 
135              }, 
136              japanese_department: { 
137                required: true 
138              }, 
139              email: { 
140                required: true, 
141                email: true 
142
143
144            var fieldStrings = { 
145              last_name_characters: { 
146                required: '<@liferay.language key="last-name" /> は必須項目です。' 
147              }, 
148              first_name_characters: { 
149                required: '<@liferay.language key="first-name" /> は必須項目です。' 
150              }, 
151              company_name_characters: { 
152                required: '貴社名 は必須項目です。' 
153              }, 
154              japanese_department: { 
155                required: '部署名 は必須項目です。' 
156              }, 
157              email: { 
158                required: '<@liferay.language key="email-address" /> は必須項目です。', 
159                email: '有効なメールアドレスを入力してください。' 
160
161
162            new A.FormValidator( 
163
164                boundingBox: '#hs-form', 
165                rules: rules, 
166                fieldStrings: fieldStrings 
167
168
169          </@> 
170          <#--  Form validation  --> 
171        </div> 
172        <p class="d-block"> 
173          <small>弊社では、資料ダウンロードフォームよりお預かりした個人情報の取扱いについて、厳格に管理し保護に努めてまいります。この先続行することで下記に同意したものとします。【個人情報保護方針】個人情報取扱い管理の詳細については、<a href="https://www.liferay.co.jp/privacy-policy" target="_blank">こちら</a>をご参照ください。</small> 
174        </p> 
175      </form> 
176    </#macro> 
177    <#--  /Macro for rendering HubSpot form. --> 
178 
179    <div class="row justify-content-center mt-5"> 
180      <div class="col col-lg-10"> 
181        <article class="row flex-column flex-xl-row justify-content-between"> 
182          <#if asset_type == "Case Study" > 
183            <#--  Left-side column.  --> 
184            <section class="col col-xl-7"> 
185              <h1 class="mb-4 text-info">${htmlUtil.escape(fields_for_case_study.company_name.getData())}</h1> 
186              <h2 class="mb-4">${htmlUtil.escape(common_fields.case_ttl.getData())}</h2> 
187              <div class="mb-4 text-body">${common_fields.case_lead.getData()}</div> 
188              <#--  Show figure if set.  --> 
189              <#if fields_for_case_study.case_catch.getData()?has_content> 
190                <figure class="mb-4"> 
191                  <img class="img-fluid" src="${fields_for_case_study.case_catch.getData()}" alt="${fields_for_case_study.company_name.getData()} Liferay導入事例"> 
192                  <figcaption>${fields_for_case_study.image_caption.getData()}</figcaption> 
193                </figure> 
194              </#if> 
195              <#--  /Show figure if set.  --> 
196              <#--  Repeat sections.  --> 
197              <#if common_fields.case_sec_rp.getSiblings()?has_content> 
198                <#list common_fields.case_sec_rp.getSiblings() as section> 
199                  <section class="mb-4"> 
200                    <h2> 
201                      ${htmlUtil.escape(section.getChild("case_sec_ttl").getData())} 
202                    </h2> 
203                    <div class="text-body"> 
204                      ${section.getChild("case_cts").getData()} 
205                    </div> 
206                  </section> 
207                </#list> 
208              </#if> 
209              <#--  /Repeat sections.  --> 
210              <@hs_form /> 
211            </section> 
212            <#--  /Left-side column.  --> 
213            <#--  Right-side column.  --> 
214            <section class="col col-xl-4 mt-5 mt-xl-0"> 
215              <div class="shadow bg-white"> 
216                <#--  Customer's logo.  --> 
217                <#if common_fields.case_logo.getData()?? && common_fields.case_logo.getData() != ""> 
218                  <div class="case-study-logo-frame text-center py-5 py-lg-4 d-flex align-items-center justify-content-center"> 
219                    <img 
220                      class="img-fluid logo" 
221                      alt="${fields_for_case_study.company_name.getData()}" 
222                      data-fileentryid="${common_fields.case_logo.getAttribute('fileEntryId')}" 
223                      src="${common_fields.case_logo.getData()}" 
224                    /> 
225                  </div> 
226                </#if> 
227                <#--  /Customer's logo.  --> 
228                <dl> 
229                  <dt class="small font-weight-bold py-3 px-4 bg-light">特色</dt> 
230                  <dd class="small py-3 px-4 text-body">${htmlUtil.escape(fields_for_case_study.case_spesc.getData())}</dd> 
231                  <dt class="small font-weight-bold py-3 px-4 bg-light">国</dt> 
232                  <dd class="small py-3 px-4 text-body">${htmlUtil.escape(fields_for_case_study.case_country.getData())}</dd> 
233                  <dt class="small font-weight-bold py-3 px-4 bg-light">業種</dt> 
234                  <dd class="small py-3 px-4 text-body">${htmlUtil.escape(fields_for_case_study.case_industry.getData())}</dd> 
235                  <dt class="small font-weight-bold py-3 px-4 bg-light">ユーザー数</dt> 
236                  <dd class="small py-3 px-4 text-body">${htmlUtil.escape(fields_for_case_study.case_employee_number.getData())}</dd> 
237                  <dt class="small font-weight-bold py-3 px-4 bg-light">ソリューション</dt> 
238                  <dd class="small py-3 px-4 text-body">${htmlUtil.escape(fields_for_case_study.case_solusion.getData())}</dd> 
239                </dl> 
240              </div> 
241            </section> 
242            <#--  /Right-side column.  --> 
243          <#else> 
244            <#--  Left-side column.  --> 
245            <section class="col col-xl-7"> 
246              <@clay.label 
247                elementClasses="bg-secondary text-white border-0 rounded-0 p-2 mb-4" 
248                label="${asset_type}" 
249                style="secondary" 
250              /> 
251              <h1>${htmlUtil.escape(article.getTitle())}</h1> 
252              <div class="row"> 
253                <div class="col-3 col-md-2"> 
254                  <hr class="pt-1 my-5 bg-primary"> 
255                </div> 
256              </div> 
257              <div class="text-body">${article.getDescription()}</div> 
258              <#--  Repeat sections.  --> 
259              <#if common_fields.case_sec_rp.getSiblings()?has_content> 
260                <#list common_fields.case_sec_rp.getSiblings() as section> 
261                  <section class="mb-4"> 
262                    <div class="text-body"> 
263                      ${section.getChild("case_cts").getData()} 
264                    </div> 
265                  </section> 
266                </#list> 
267              </#if> 
268              <#--  /Repeat sections.  --> 
269            </section> 
270            <#--  /Left-side column.  --> 
271            <#--  Right-side column.  --> 
272            <section class="col col-xl-5"> 
273              <div class="shadow rounded p-4 bg-white"> 
274                <@hs_form /> 
275              </div> 
276            </section> 
277            <#--  /Right-side column.  --> 
278          </#if> 
279        </article> 
280      </div> 
281    </div> 
282 
283    <style> 
284      #p_p_id${portlet_namespace} .portlet .visible-interaction { 
285        display: block; 
286
287 
288      #p_p_id${portlet_namespace} .case-study-logo-frame { 
289        min-height: 160px; 
290
291 
292      #p_p_id${portlet_namespace} .img-fluid.logo { 
293        width: 212px; 
294
295 
296      #p_p_id${portlet_namespace} .header-back-to, 
297      #p_p_id${portlet_namespace} .asset-title, 
298      #p_p_id${portlet_namespace} .asset-avatar, 
299      #p_p_id${portlet_namespace} .asset-avatar + div { 
300        display: none !important; 
301
302    </style> 
303  <#--  ↑↑↑データ以降作業完了後に残すコードここまで↑↑↑  --> 
304<#else> 
305  <#--  ↓↓↓リファクタ前のコード・移行作業完了次第削除する↓↓↓  --> 
306    <#assign 
307      languageId = languageUtil.getLanguageId(locale) 
308      journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
309      article = journalArticleLocalService.getArticle( groupId, .vars["reserved-article-id"].data ) 
310      resourceprimKey = article.getResourcePrimKey() 
311      assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") 
312      assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") 
313      dlAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"] 
314      dlUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil"] 
315      assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", resourceprimKey) 
316      tagUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") 
317      tags = tagUtil.getAssetEntryAssetTags(assetEntry.getEntryId()) 
318      dLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") 
319      dLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService") 
320      dLFileEntryMetadataLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryMetadataLocalService") 
321      storageEngine = serviceLocator.findService("com.liferay.dynamic.data.mapping.storage.StorageEngine") 
322      serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() 
323      httpServletRequest = serviceContext.getRequest() 
324      themeDisplay = serviceContext.getThemeDisplay() 
325
326 
327    <#function value_of docXml field language_id> 
328        <#local default_language_id = docXml.valueOf("/root/@default-locale") /> 
329        <#local value = docXml.valueOf("//dynamic-element[@name='" + field + "']/dynamic-content[@language-id='"+ language_id + "']/text()") /> 
330        <#if !value?has_content> 
331            <#local value = docXml.valueOf("//dynamic-element[@name='" + field + "']/dynamic-content[@language-id='"+ default_language_id + "']/text()") /> 
332        </#if> 
333        <#return value /> 
334    </#function> 
335 
336    <#attempt> 
337 
338    <#assign 
339      docXml = saxReaderUtil.read(article.getContent()) 
340      dmXmlfield = value_of(docXml, "dmAsset", languageId) 
341      evalDmField = dmXmlfield?eval 
342      uuid = evalDmField.uuid 
343      groupId = evalDmField.groupId 
344      dlFileEntry = dLFileEntryLocalService.fetchDLFileEntryByUuidAndGroupId(uuid,groupId?number) 
345      dlFileEntryType = dLFileEntryTypeLocalService.getFileEntryType(dlFileEntry.getFileEntryTypeId()) 
346      ddmStructures = dlFileEntryType.getDDMStructures() 
347      ddmStructure = ddmStructures?first 
348      dlFileEntryMetadata = dLFileEntryMetadataLocalService.getFileEntryMetadata(ddmStructure.getStructureId(), dlFileEntry.getFileVersion().getFileVersionId()) 
349      ddmFormValues = storageEngine.getDDMFormValues(dlFileEntryMetadata.getDDMStorageId()) 
350      ddmFormFieldValuesMap = ddmFormValues.getDDMFormFieldValuesMap() 
351 
352      <#--  DL related variables.  --> 
353      asset_title = dlFileEntry.getTitle() 
354      asset_type = ddmFormFieldValuesMap['asset_type'][0].getValue().getString(locale)?remove_beginning('[\"')?remove_ending('\"]') 
355      recent_asset_primary_buyer_stage = ddmFormFieldValuesMap['recent_asset_primary_buyer_stage'][0].getValue().getString(locale)?remove_beginning('[\"')?remove_ending('\"]') 
356      recent_conversion_type = ddmFormFieldValuesMap['recent_conversion_type'][0].getValue().getString(locale)?remove_beginning('[\"')?remove_ending('\"]') 
357 
358      <#--  GET parameters related variables.  --> 
359      recent_conversion_medium = paramUtil.getString(httpServletRequest, "utm_medium") 
360      recent_conversion_source = paramUtil.getString(httpServletRequest, "utm_source") 
361      recent_conversion_source_content = paramUtil.getString(httpServletRequest, "utm_content") 
362      recent_conversion_source_term = paramUtil.getString(httpServletRequest, "utm_term") 
363      campaign = paramUtil.getString(httpServletRequest, "utm_campaign") 
364      recent_asset_url = themeDisplay.getPortalURL() + common_fields.dmAsset.getData() + "&download=true" 
365      redirectUrl = themeDisplay.getPortalURL() + "/web/japan/resources/thank-you?asset_name=" + asset_title + "&asset_url=" + recent_asset_url 
366 
367      <#--  Related assets links.  --> 
368      articleRelatedLinks = assetLinkLocalService.getDirectLinks(assetEntry.getEntryId()) 
369    /> 
370 
371    <#--  For rendering HubSpot form. --> 
372    <#macro hs_form> 
373      <form id="hs-form" method="POST" action='https://forms.hubspot.com/uploads/form/v2/${common_fields.PortalID.getData()}/${common_fields.FormGUID.getData()}'> 
374        <div class="sheet-header"> 
375          <div class="sheet-text">以下のフォームに必要事項をご入力の上、<b><@liferay.language key="download" /></b>をクリックすると、資料ダウンロードがはじまります。</div> 
376        </div> 
377        <div class="sheet-section"> 
378          <div class="form-group-autofit"> 
379            <div class="form-group-item"> 
380              <input name="last_name_characters" class="form-control" placeholder='<@liferay.language key="last-name" /> *' type="text" required /> 
381            </div> 
382            <div class="form-group-item"> 
383              <input name="first_name_characters" class="form-control" placeholder='<@liferay.language key="first-name" /> *' type="text" required /> 
384            </div> 
385          </div> 
386          <div class="form-group-autofit"> 
387            <div class="form-group-item"> 
388              <input name="company_name_characters" class="form-control" placeholder="貴社名 *" type="text" required /> 
389            </div> 
390          </div> 
391          <div class="form-group-autofit"> 
392            <div class="form-group-item"> 
393              <input name="japanese_department" class="form-control" placeholder="部署名 *" type="text" required /> 
394            </div> 
395          </div> 
396          <div class="form-group-autofit"> 
397            <div class="form-group-item"> 
398              <input name="email" class="form-control" placeholder='<@liferay.language key="email-address" />(勤務先) *'' type="email" required /> 
399            </div> 
400          </div> 
401          <div class="d-none"> 
402            <input type="hidden" name="country" value="Japan" class="form-control"> 
403            <input type="hidden" name="asset_id" value="${uuid}" class="form-control"> 
404            <input type="hidden" name="asset_name" value="${dlFileEntry.getTitle()}" class="form-control"> 
405            <input type="hidden" name="asset_type" value="${asset_type}" class="form-control"> 
406            <input type="hidden" name="recent_asset_primary_buyer_stage" value="${recent_asset_primary_buyer_stage}" class="form-control"> 
407            <input type="hidden" name="recent_conversion_type" value="${recent_conversion_type}" class="form-control"> 
408            <input type="hidden" name="recent_conversion_medium" value="${recent_conversion_medium}" class="form-control"> 
409            <input type="hidden" name="recent_conversion_source" value="${recent_conversion_source}" class="form-control"> 
410            <input type="hidden" name="recent_conversion_source_content" value="${recent_conversion_source_content}" class="form-control"> 
411            <input type="hidden" name="recent_conversion_source_term" value="${recent_conversion_source_term}" class="form-control"> 
412            <input type="hidden" name="recent_conversion_previous_page_seen" value='${request.getHeader("REFERER")!}' class="form-control"> 
413            <input type="hidden" name="asset_url" value="${recent_asset_url}" class="form-control"> 
414            <input type="hidden" name="campaign" value="${campaign}" class="form-control"> 
415            <input type="hidden" name="hs_context" value='{"redirectUrl": "${redirectUrl?html}", "ipAddress": "${request.getRemoteAddr()}"}' class="form-control"> 
416          </div> 
417        </div> 
418        <div class="sheet-footer sheet-footer-btn-block-sm-down mt-0"> 
419          <div class="btn-group"> 
420            <div class="btn-group-item"> 
421              <input class="btn btn-primary" type="submit" value='<@liferay.language key="download" />' /> 
422            </div> 
423          </div> 
424          <@liferay_aui.script use="aui-form-validator"> 
425            var rules = { 
426              last_name_characters: { 
427                required: true 
428              }, 
429              first_name_characters: { 
430                required: true 
431              }, 
432              company_name_characters: { 
433                required: true 
434              }, 
435              japanese_department: { 
436                required: true 
437              }, 
438              email: { 
439                required: true, 
440                email: true 
441
442
443            var fieldStrings = { 
444              last_name_characters: { 
445                required: '<@liferay.language key="last-name" /> は必須項目です。' 
446              }, 
447              first_name_characters: { 
448                required: '<@liferay.language key="first-name" /> は必須項目です。' 
449              }, 
450              company_name_characters: { 
451                required: '貴社名 は必須項目です。' 
452              }, 
453              japanese_department: { 
454                required: '部署名 は必須項目です。' 
455              }, 
456              email: { 
457                required: '<@liferay.language key="email-address" /> は必須項目です。', 
458                email: '有効なメールアドレスを入力してください。' 
459
460
461            new A.FormValidator( 
462
463                boundingBox: '#hs-form', 
464                rules: rules, 
465                fieldStrings: fieldStrings 
466
467
468          </@> 
469        </div> 
470        <p class="d-block"> 
471          <small>弊社では、資料ダウンロードフォームよりお預かりした個人情報の取扱いについて、厳格に管理し保護に努めてまいります。この先続行することで下記に同意したものとします。【個人情報保護方針】個人情報取扱い管理の詳細については、<a href="https://www.liferay.co.jp/privacy-policy" target="_blank">こちら</a>をご参照ください。</small> 
472        </p> 
473      </form> 
474    </#macro> 
475 
476    <#-- Output related assets list --> 
477    <#macro relatedAssetsList articleRelatedLinks languageId> 
478      <#if articleRelatedLinks?size == 0> 
479        <#return> 
480      </#if> 
481 
482      <div class="related-assets mt-5 pt-5"> 
483        <h2 class="entrypost-cts-ttl mb-4">関連する事例・資料</h2> 
484        <#list articleRelatedLinks as relatedEntry> 
485          <#local 
486            relatedAssetEntryId = relatedEntry.getEntryId2() 
487            relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) 
488            relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() 
489            relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) 
490            assetRenderer = relatedAssetEntry.getAssetRenderer() 
491            relatedArticle = assetRenderer.getArticle() 
492            docXml = saxReaderUtil.read(relatedArticle.getContent()) 
493            logo = value_of(docXml, "case_logo", languageId) 
494            viewURL = "/-/" + relatedArticle.getUrlTitle() 
495          /> 
496          <a class="d-block" href="${viewURL}"> 
497            <article class="border-bottom mb-4 pb-4"> 
498              <header class="d-flex align-items-stretch" style="min-height: 90px"> 
499              <#if logo?has_content> 
500                <#local 
501                  logo = logo?eval 
502                  logoUuid = logo.uuid 
503                  groupId = logo.groupId 
504                  dlFile = dlAppLocalServiceUtil.getFileEntryByUuidAndGroupId(logoUuid,groupId?number) 
505                  imgUrl = dlUtil.getPreviewURL(dlFile, dlFile.getFileVersion(),themeDisplay,'') 
506                /> 
507                <div class="col-3 related-assets__thumbnail border"> 
508                  <div class="related-assets__thumbnail_frame h-100 d-flex align-items-center"> 
509                    <img class="mx-auto" src="${imgUrl}" width="70" height="80" alt="${relatedArticle.getTitle(locale)}"> 
510                  </div> 
511                </div> 
512                <h1 class="col h6 related-assets_title align-self-center">${relatedArticle.getTitle(locale)}</h1> 
513              </#if> 
514              </header> 
515            </article> 
516          </a> 
517        </#list> 
518      </div> 
519    </#macro> 
520 
521    <#if asset_type != "Case Study"> 
522      <div class="container my-5 py-5"> 
523        <div class="row justify-content-between"> 
524          <div class="col-md-11 mx-auto"> 
525            <div class="row"> 
526              <div class="col-md-7"> 
527                <article> 
528                  <section class="mb-5"> 
529                    <span class="badge badge-secondary mb-4 rounded-0 border-0 py-2 px-3 font-weight-normal"> 
530                      <span class="badge-item badge-item-expand">${asset_type}</span> 
531                    </span> 
532                    <h1 class="h2 font-weight-bold">${common_fields.case_ttl.getData()}</h1> 
533                    <div class="row"> 
534                      <div class="col-md-2"><hr class="pt-1 badge-primary my-5"></div> 
535                    </div> 
536                    <p>${common_fields.case_lead.getData()}</p> 
537                  </section> 
538                  <#if common_fields.case_sec_rp.getSiblings()?has_content> 
539                    <#list common_fields.case_sec_rp.getSiblings() as section> 
540                      <section class="mb-5"> 
541                        <h2 class="h5 font-weight-bold mb-3 text-secondary">${section.case_sec_ttl.getData()}</h2> 
542                        <div>${section.case_cts.getData()}</div> 
543                      </section> 
544                    </#list> 
545                  </#if> 
546                  <@relatedAssetsList articleRelatedLinks=articleRelatedLinks languageId=languageId /> 
547 
548                </article> 
549              </div> 
550              <div class="col-md-5 ml-auto"> 
551                <div class="sheet border-0 bx-shdw-round"> 
552                  <figure class="col-md-8 mx-auto mb-5 mt-3"> 
553                    <img src="${common_fields.dmAsset.getData()}&previewFileIndex=1" class="card"> 
554                  </figure> 
555                  <@hs_form /> 
556                </div> 
557              </div> 
558            </div> 
559          </div> 
560        </div> 
561      </div> 
562    <#else> 
563      <div class="casestudy"> 
564        <div class="container wrap sec"> 
565          <article class="casestudy-detail entrypost"> 
566            <section class="casestudy-cts"> 
567              <h1 class="company-name fnt-ppns">${fields_for_case_study.company_name.getData()}</h1> 
568              <h2 class="casestudy-ttl">${common_fields.case_ttl.getData()}</h2> 
569              <div class="entrypost-intro"> 
570                <p>${common_fields.case_lead.getData()}</p> 
571              </div> 
572              <#if fields_for_case_study.case_catch.getData()?has_content> 
573                <div> 
574                  <figure> 
575                    <img src="${fields_for_case_study.case_catch.getData()}" alt="${fields_for_case_study.company_name.getData()} Liferay導入例"> 
576                    <figcaption>${fields_for_case_study.image_caption.getData()}</figcaption> 
577                  </figure> 
578                </div> 
579              </#if> 
580              <#-- ここからセパレートストラクチャー case_sec_rp	の繰り返し --> 
581              <#if common_fields.case_sec_rp.getSiblings()?has_content> 
582                <#list common_fields.case_sec_rp.getSiblings() as section> 
583                  <section class="entrypost-cts"> 
584                    <h2 class="entrypost-ttl"> 
585                      <#-- セクションタイトル--> 
586                      ${section.getChild("case_sec_ttl").getData()} 
587                    </h2> 
588                    <div class="entrypost-main"> 
589                      <#-- セクション内容--> 
590                      ${section.getChild("case_cts").getData()} 
591                    </div> 
592                  </section> 
593                </#list> 
594              </#if> 
595              <#-- ここまでセパレートストラクチャー case_sec_rp	の繰り返し --> 
596              <@hs_form /> 
597              <@relatedAssetsList articleRelatedLinks=articleRelatedLinks languageId=languageId /> 
598 
599            </section> 
600            <div class="casestudy-company-info"> 
601              <div class="bx-shdw-round"> 
602                <div class="casestudy-company-box"> 
603                  <h3 class="casestudy-company-logo"> 
604                    <#if common_fields.case_logo.getData()?? && common_fields.case_logo.getData() != ""> 
605                      <img alt="${fields_for_case_study.company_name.getData()}" data-fileentryid="${common_fields.case_logo.getAttribute('fileEntryId')}" src="${common_fields.case_logo.getData()}" /> 
606                    </#if> 
607                  </h3> 
608                </div> 
609                <dl> 
610                  <div> 
611                    <dt>特色</dt> 
612                    <dd>${fields_for_case_study.case_spesc.getData()}</dd> 
613                  </div> 
614                  <div> 
615                    <dt>国</dt> 
616                    <dd>${fields_for_case_study.case_country.getData()}</dd> 
617                  </div> 
618                  <div> 
619                    <dt>業種</dt> 
620                    <dd>${fields_for_case_study.case_industry.getData()}</dd> 
621                  </div> 
622                  <div> 
623                    <dt>ユーザー数</dt> 
624                    <dd>${fields_for_case_study.case_employee_number.getData()}</dd> 
625                  </div> 
626                  <div> 
627                    <dt>ソリューション</dt> 
628                    <dd>${fields_for_case_study.case_solusion.getData()}</dd> 
629                  </div> 
630                </dl> 
631              </div> 
632            </div> 
633          </article> 
634        </div> 
635      </div> 
636    </#if> 
637    <#recover> 
638      <div class="container my-5 py-5"> 
639        <div class="row justify-content-between"> 
640          <div class="col-md-12"> 
641            <article> 
642              <section> 
643                <div class="alert-container container"> 
644                  <div class="alert-notifications"> 
645                    <div class="alert alert-dismissible alert-danger" role="alert" style="width:600px;"> 
646                      <h5>記事 : ${.vars['reserved-article-title'].data}</h5> 
647                      <h5>で不正なMetadata Setのアセットが選択されています。</h5> 
648                      <p>Hubspot Form用のドキュメントとメディア Metadata Setを利用しているアセットを選択してください。不明な場合はWeb管理者までご連絡ください。</p> 
649                    </div> 
650                  </div> 
651                </div> 
652              </section> 
653            </article> 
654          </div> 
655        </div> 
656      </div> 
657    </#attempt> 
658  <#--  ↑↑↑リファクタ前のコード・移行作業完了次第削除する↑↑↑  --> 
659</#if> 

Upgrade - jp common footer contact or demo