Implementing Change to Build Resiliency - UST
Info Center Main Carousel




Resources Overview Tabbed Content
Asset Publisher
Some argue that they couldn’t prepare for the pandemic, because it was a black swan event—defined as unforeseeable. While that may be true, it’s imperative to develop and implement better defenses against future incidents—regardless of forewarning. Whether the next calamity is a virus, an extreme weather event, or something else, the effects to your nonprofit can be mitigated. Take strategic steps now to protect your clients, workers, continuity of services, and overall sustainability from whatever the future may bring.
Three Major Threats
Start by understanding and correcting three common vulnerabilities. First, study your supply chain and its logistics risks. Those with global supply chains may be at higher levels of vulnerability to any kind of worldwide incident. Next, make sure to complete your survival plan to manage your continuity in the event of any kind of shutdown or crisis. And third, understand that communication helps to reduce uncertainty, so develop a clear communication plan with your team and partners. Once you’ve taken these initial steps, you're ready to deep-dive into real preparedness.
Three Keys to Recovery
Nonprofits strengthen their resilience through robust, faster, and more inclusive post-disaster rebuilding. When the process is robust, organizations become less vulnerable to future disruptions; when it's fast, people can get back to their normal life earlier; and when it's inclusive, nobody is left behind in the recovery process. Now, imagine that public and private stakeholders across the land are performing the same process. This can include small and large governmental agencies, for-profit companies, private citizen groups, and nonprofit organizations. Encourage your nonprofit to join the conversation, as everyone pulls together to build back better, with faster communication, inclusive thinking, and robust planning.
The Unfolding Future and Disaster Risk Reduction
The effects of climate change are already increasing destruction and the risk of life globally. Many are already seeking ways to mitigate and prepare for upcoming disasters. Flood, fire, and disease are on the rise, as we continue to survive through natural disasters such as earthquakes and tsunamis. The United Nation’s 2015 Global Assessment Report on Disaster Risk Reduction (GAR) predicted that “the risk of economic losses is rising as a result of the rapidly increasing value of assets that are exposed to major hazards.” In addition, a large proportion of losses continue to be associated with small and recurring disaster events that severely damage critical public infrastructure, human lives, animal and wildlife, agriculture, housing, and production.”
It is no longer practical to put off disaster preparedness in the hope that it won’t happen. True, nonprofits must work within limited budgets, often relying on the ingenuity of their leaders. Because of this, the best plan for long-term resiliency is to integrate sustainability into everything your nonprofit does. Resilience means that your nonprofit will be able to adapt and recover rapidly from disruptions due to emergencies.
No matter how devastating an emergency might be, recovery can take place. It might require months or even years, but when communities work together, balancing short-term objectives and long-term goals, involving all stakeholders, and following a common vision for the future – they can pull together funding from more sources, additional technical support, and information gleaned from other nonprofits to build back better, stronger, more adaptable, and more resilient.
The good news is various programs are now available to reduce the impact of natural, technological, and human-made events on your nonprofit’s community. The National Hazard Management Association (NHMA) has developed the Disaster Risk Reduction Ambassador Curriculum (DRR) in cooperation with FEMA. The DRR Ambassador Curriculum helps community stakeholders find ways to understand and prepare to implement programs and measures handling the entire disaster cycle – pre, during and post disaster. This supports nonprofit and other community leaders as they engage in community-level discussions with multidisciplinary educational resources, self-study materials, and training workshops. You will find three stand-alone modules, each taking about 1 to 2 hours to complete. Whether or not you can complete this training, your nonprofit could benefit from the aid of a DRR Ambassador. They come from various backgrounds and groups with the goal of helping their communities take strong proactive steps to mitigate risks from natural hazards. Bold decision-making comes from a process of education and discussion, but the rewards will take your organization beyond the minimal protection provided by existing federal standards.
DRR Ambassadors use a reference guide titled Building Your Roadmap to a Disaster Resilient Future. The Roadmap provides ideas for community disaster risk reduction along with explanations and hyperlinks to a wide array of technical and other resources needed at various junctures. Communities that avail themselves to NHMA’s program are clearly better prepared to face natural disasters in the future.
The Seven Basics
Here are seven important steps to a stronger, more resilient future:
Conduct annual risk assessments. Begin by seeing the potential scale of a hazard. Three areas deserve special consideration in gauging risks:
- Finances. How manageable is your cash flow, debts, and expenses? Can you predict your nonprofit’s financial health up to a year? Address those red flags of worsening scenarios.
- Technology and equipment. Cybersecurity threats can damage your bottom line and reputation. Its critical to audit your security often, as technology is constantly evolving.
- Workspace Safety. How safe is your building and its location? Work with government agencies to weigh your risk for weather-related disasters, including floods, as well as natural disasters like earthquakes. Follow health safety updates for your building.
Cross-train employees with a clear training plan. Do your best to triage topics so they learn CPR and first aid first. Teach an escape plan, disaster preparedness, and preparation for other risks to life. Additionally, help employees train to work in additional roles and under different working conditions, such as a temporary worksite.
Stock up on supplies. Your team might be required to shelter in place at the office. Are you prepared with three days of shelf-stable food and water—enough for everyone? Remember to keep fresh hand sanitizer, anti-bacterial wipes, gloves, masks, flashlights, batteries, blankets, and phone chargers well-stocked for emergencies. Note expiration dates.
Save for a rainy day. Try to build up a cash reserve equal to three to six months of your nonprofit’s expenses. A 3-month fund should be considered bare minimum. If you have a 6-month fund, you will be prepared for unexpected opportunities.
Put your people first. Enact policies to address your staff’s needs during an emergency. Help them handle their primary concern, their families, so they can then focus on your nonprofit. Plan for work-from-home options and possibly providing childcare. Also, take some time each year to review your paid leave, health insurance, and sick leave policies. How might you build in more flexibility? Set guidelines for hazard pay to help those working in essential roles under tough conditions. Show them they are valued to motivate your team during challenging events.
Re-examine and diversify your fundraising efforts. If you’ve always relied on an annual gala event, it’s time to consider additional funding options. Build your adaptability in the event of closures. If you already have a variety of sources, conduct an audit to see which are the most successful and find ways to grow those.
Apply what you’ve learned. The pandemic provided vast learning opportunities. Explore all your strategies—from policies that protected your employees’ health to ways you handled financial losses. What worked? What didn’t? Consult your organization’s stakeholders including experts, like accountants and lawyers. Be proactive in fixing what didn’t work and promoting what did.
Agility and the Post-COVID Landscape
Are you exhausted from deploying stop-gap measures? Have you been slashing budgets, shifting services online, and doing whatever else you can to help your community and protect your nonprofit? The truth has become obvious. Each challenge is only one in a series of ongoing crises that will continue to threaten your organization. You must develop a frame of mind that continuously generates fresh, new solutions – with creativity and resourcefulness. Integrating sustainability is key to adapting more rapidly to crises. Those organizations that were committed to this before the pandemic struck were better able to navigate the challenges it brought.
Many nonprofits discovered to their dismay that the tools and policies they had in place as pre-planning prior to COVID failed to manage the speed, scale, breadth, and duration of all the pandemic’s impacts. Advance investments in your human and social capital that will help. Your team’s awareness of several potential pressures that could combine toward disaster will help you move toward best-practice management of your potential risks.
While you deploy stress tests and other exercises to prepare for the future, think about how your team has communicated during the pandemic. Everyone was forced to reconsider presuppositions and communicate clearly, no matter how fluid the situation. So now, you must encourage innovative thinking, rehearse dynamic situations and seek to empower your workers to own and manage risk within their scope of influence. This is one way of weaving resilience into the fabric of your organization’s culture. Investing in your staff first, helping them to communicate effectively with stakeholders, and building their leadership skills will position your nonprofit to better navigate future crises.
You’ve seen how everything is connected. Natural events, social order, and economic systems all flow together to impact your nonprofit. More than ever, events strike with ferocious speed and impact requiring sudden changes in strategy. We will continue to feel the increasing effects of climate change, deepening inequality, biodiversity loss, political upheaval, and more. Work with your nonprofit’s leadership to be clear, decisive, and authentic in all communication with the team so that everyone places their priorities in alignment, and your organization will be better prepared to pivot.
The following guiding principles have helped other nonprofits maintain their equilibrium as they’ve worked with donors, boards and government agencies to spark endless innovation:
• Keep going. Your ability to pivot might not always look perfect, but it will fail completely if you allow yourself to be stopped by disruptions. Many nonprofits were deeply challenged by the shift to virtual services, but those with an unrelenting attitude were eventually able to adapt. You must keep moving, trying, pushing, and innovating.
• Question fundamental assumptions, so you can imagine being part of a changed future. Take time to evaluate the changing political, physical, social, economic, and health needs of your community and targeted population. How should your mission and vision change? Be sure to test the appropriateness of multiple approach options, then explore how you might scale your chosen best result, and finally how you might escape the drag of longstanding processes that restrict fresh approaches. These three steps will empower you to solve complicated challenges.
• Focus on the most vulnerable. While it’s important to work toward larger dreams for the future, try to avoid leaving behind marginalized community members. Solutions that you devise for the most marginalized populations will find their way to help the larger society, too.
• Small steps add up to big changes. Start with small, rigorously tested ideas. Your methodology will mean everything as you design a process for continuous, everyday innovation. Start with one small problem. Generate promising ideas. Then, come up with early prototypes so that you can test, gauge, and improve whichever one has the best potential to make the most impact. Rapid prototyping is a more flexible and cost-effective approach than major initiative launches.
With each bit of urgency in a crisis, there is also opportunity. Innovate by surveying community members, brainstorming ideas, and rapidly developing simple prototypes of the most promising solutions. Start with the most severely impacted in a crisis and scale it up later. Seizing the moment could help you lead your nonprofit past whatever has blocked change in the past. You might feel like you’re building the jet plane during take-off, but when you factor in creativity, energy, enthusiasm, and constant learning … your odds of staying aloft are good.
Aim Toward Social Purpose
While many nonprofit leaders feel pressured into focusing on financial health, a broader view will help in providing more sustainability. Social purpose, with a clear understanding of your desired impact, will guide your decisions as you seek to balance your budget against your capacity to deliver impact. COVID-19 will eventually retreat into the past, but it has left in its wake a lasting effect on how we determine our effectiveness. Keeping social purpose in mind, follow these priority takeaways:
• Social Impact. No matter how society shifts, a sharp focus on your intended impact and theory of change will help you stay relevant. If you’re forced to forge new partnerships, alter your services or advocate in new ways, reexamining your social impact is critical to informing all decisions. As community need rises, develop new ways to deliver services while maintaining public support.
• Economic Viability. If you’re struggling to handle increased demand with disruptions in funding, you’re not alone. These destabilizing conditions could threaten your long-term financial wellness, and some threats will no doubt continue in the future. Sustainable nonprofits must have reliable funding and predictable expenses as well as cash on hand for routine and emergency expenses. Develop processes for managing your financial viability. First, take a clear and detailed assessment of your financial situation. Second, plan for various financial scenarios and emergencies. Finally, be honest with all your stakeholders including donors. Ask the tough questions, such as who plans to donate again. For better planning, you need to know.
• Capacity to Deliver. Four core ideals will help you maintain services. First, you must set up a strong and distributed leadership that can pivot in response to dynamic challenges. Second, your team must be flexible, recognizing potential changes in member needs, client behaviors, and the general community landscape. Third, look for more ways to collaborate with other nonprofits and agencies. Consider public-private partnerships. Make sure your cultural values are clear, give your team cooperative skillsets, and build incentives from the top-down, so your leaders model collaboration. Fourth, build your capacity for technological improvements. Work out the training your staff will need and establish whether technology can help you scale up services while lowering your long-term costs.
Under the Radar
Most companies have a new take on teleworking, which will change where people live. Depending on the nature and location of your mission, you might notice a subtle shift in populations. COVID-19 and other recent events have sparked this interest in landscapes amenable to social distancing, home-centered work, and a small-town quality of life. In ways similar to those wrought by the last century’s industrial revolution, macro-socioeconomic shifts caused by the pandemic could mean big changes are coming. Eventually, large cities could see decreased demand for services while small-town nonprofits experience growth in supportive community members.
Your new battleground might be at the digital divide, fighting to provide reliable high-speed internet access to all, especially in rural areas. Nonprofits and NGOs should recognize the opportunities for local communities collaborating to put the COVID crisis behind, overcome the challenges of social unrest, and work together toward solutions. It shouldn’t surprise you to learn that real estate agents in small towns across America have become partners toward social change, as the National Association of Realtors published information on equity, stabilization, and developing community engagement for their members.
Rural and suburban communities are remaining online. In fact, growing their online presence, like online crowdfunding, becomes a viable financial resource for nonprofits. Most of all, keep your eyes open for further societal evolution—perhaps, the next macro-adjustments will alter the very core of your nonprofit.
This is an excerpt from UST’s eBook, “3 Key Strategies for Nonprofit Resiliency: Preparing for Future Crises” in collaboration with Beth Black, Writer and Editor.
Asset Publisher
Java method "com.sun.proxy.$Proxy131.getDLFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy131 object "com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl@57bdc4"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign dlfileEntry2 = documentServic... [in template "6242803#6242849#6281901" at line 83, column 1] ----
1<#assign liferay_ui = taglibLiferayHash["/META-INF/liferay-ui.tld"] />
2<#assign liferay_theme = taglibLiferayHash["/META-INF/liferay-theme.tld"] />
3<@liferay_theme["defineObjects"]/>
4
5<#assign blogsEntryLocalService = serviceLocator.findService("com.liferay.blogs.kernel.service.BlogsEntryLocalService")>
6<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryService")>
7<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
8<#assign documentService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
9
10
11<#assign namespace = randomNamespace />
12<#assign smallImageURL = "">
13<#assign imageUrl = "">
14<#assign videoUrl = "">
15<#assign subHeading = "">
16<#assign blogClassName="com.liferay.blogs.kernel.model.BlogsEntry">
17<#assign documentClassName = "com.liferay.document.library.kernel.model.DLFileEntry">
18<#assign vocabularyNameToUse = "Topic">
19<#assign resetCurParam = "false">
20<#if renderRequest.getParameter("resetCur")?? && renderRequest.getParameter("resetCur")??>
21 <#if renderRequest.getParameter("resetCur") == "true">
22 <#assign resetCurParam = "false">
23 </#if>
24</#if>
25<#assign categoryIdParam = "">
26<#if renderRequest.getParameter("categoryId")?? && renderRequest.getParameter("categoryId")??>
27 <#assign categoryIdParam = renderRequest.getParameter("categoryId")>
28</#if>
29<#assign pagination = "none">
30<#assign pageinationDelta = 5>
31
32<#attempt>
33 <#assign pagination = portletPreferences["paginationType"]?first >
34 <#recover>
35</#attempt>
36
37<#attempt>
38 <#assign pageinationDelta = portletPreferences["delta"]?first?number >
39 <#recover>
40</#attempt>
41
42<#assign portletId = themeDisplay.getPortletDisplay().getId()>
43<#assign siteGroupID = themeDisplay.getSiteGroupId()>
44
45<#assign vocabularyIdToUse = 0>
46<#attempt>
47 <#assign vocabularyIdToUse = assetVocabularyLocalService.getGroupVocabulary(themeDisplay.getSiteGroupId(), vocabularyNameToUse).getVocabularyId()>
48 <#recover>
49</#attempt>
50
51<script>
52function redirectToPage(pageURL){
53 var pathValue = window.location.pathname;
54 pageURL = pageURL.replace(" ","-").replace("'","-").replace("&","");
55 var rest = pathValue.substring(0, pathValue.lastIndexOf("/") + 1);
56 var last = pathValue.substring(pathValue.lastIndexOf("/") + 1, pathValue.length);
57 var pathValue = pathValue.replace(last,pageURL);
58 //console.log("pathValue : " +pathValue);
59 window.location.href = pathValue;
60}
61</script>
62
63<script>
64$(document).ready(function() {
65 $('.${namespace}asset-img .video-click-popup').click(function() {
66 showVideoPlayerModal($(this).attr('href'));
67 });
68});
69</script>
70
71<div id="${namespace}info-wrapper" class="info-wrapper">
72<#assign fullUid = "">
73<#list entries as entry>
74<#-- ${entry.title}<br> -->
75<#assign firstChar = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("image-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())?last_index_of("/")>
76<#assign lastChar = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("image-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())?index_of("?")>
77
78<#assign firstSlash = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("image-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())?index_of("/")>
79<#assign lastSlash = firstChar>
80<#assign strToReplace = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("image-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())?substring(firstSlash+1, lastSlash)>
81
82<#assign fullUid = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("image-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())?substring(firstChar+1, lastChar)>
83<#assign dlfileEntry2 = documentService.getDLFileEntryByUuidAndGroupId(fullUid, siteGroupID)>
84<#-- ${fullUid}<br> -->
85<#assign imageFolderID = dlfileEntry2.getFolderId()>
86<#assign imageTitle = dlfileEntry2.getTitle()>
87<#assign replaceStr = "documents"+"/"+siteGroupID+"/"+imageFolderID+"/"+imageTitle>
88
89 <#assign dateToUse = entry.getCreateDate()>
90 <#assign entry = entry />
91
92 <#assign assetRenderer = entry.getAssetRenderer() />
93
94 <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) />
95
96 <#assign dlfileModalPopup = "">
97
98 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
99 <#assign linkTarget = "">
100 <#if assetLinkBehavior != "showFullContent">
101 <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
102 <#assign viewURL = "/c/blogs/find_entry?entryId=" + entry.getClassPK()>
103 </#if>
104 <#assign blogCategoies = assetCategoryService.getCategories(entry.getClassName(), entry.getClassPK())>
105 <#assign entryClassName = entry.getClassName()>
106
107 <#if (entryClassName == blogClassName)>
108 <#assign blogEntry = blogsEntryLocalService.getEntry(entry.getClassPK())>
109 <#assign dateToUse = blogEntry.getDisplayDate()>
110 <#assign imageUrl = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("image-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())>
111
112 <#assign fixUrl = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("image-url")?replace(strToReplace, replaceStr)>
113 <#assign imageUrl = fixUrl>
114
115 <#assign videoUrl = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("video-url")>
116 <#assign subHeading = blogsEntryLocalService.getEntry(entry.getClassPK()).getExpandoBridge().getAttribute("sub-heading")>
117 <#if blogEntry.isSmallImage() >
118 <#assign smallImageURL = blogEntry.getEntryImageURL(themeDisplay)?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())>
119 </#if>
120 <#elseif entryClassName == documentClassName>
121 <#attempt>
122 <#assign dlFileEntry = documentService.getDLFileEntry(entry.getClassPK())>
123 <#if dlFileEntry.getExpandoBridge().hasAttribute("image-url")>
124 <#assign imageUrl = dlFileEntry.getExpandoBridge().getAttribute("image-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())>
125 ${imageUrl}
126 </#if>
127 <#if dlFileEntry.getExpandoBridge().hasAttribute("icon-url")>
128 <#assign smallImageURL = dlFileEntry.getExpandoBridge().getAttribute("icon-url")?replace("[$SITE_GROUP_ID$]", themeDisplay.getSiteGroupId())>
129 </#if>
130 <#if dlFileEntry.getExpandoBridge().hasAttribute("display-title")>
131 <#assign documentDisplayTitle = dlFileEntry.getExpandoBridge().getAttribute("display-title")>
132 <#if documentDisplayTitle?has_content>
133 <#assign entryTitle = htmlUtil.escape(documentDisplayTitle) />
134 </#if>
135 </#if>
136 <#if dlFileEntry.getExpandoBridge().hasAttribute("modal-popup-function")>
137 <#assign dlfileModalPopup = dlFileEntry.getExpandoBridge().getAttribute("modal-popup-function")>
138 </#if>
139
140 <#if !dlfileModalPopup?has_content>
141 <#assign viewURL = themeDisplay.getPortalURL() + "/c/document_library/get_file?uuid=" + dlFileEntry.getUuid() + "&groupId=" + themeDisplay.getScopeGroupId()>
142 <#assign linkTarget = "target=\"_blank\"">
143 </#if>
144 <#recover>
145
146 </#attempt>
147 </#if>
148 <#assign linkTarget = "target=\"_blank\"">
149
150<div class="asset-wrapper">
151 <#if dlfileModalPopup?has_content>
152 <div class="${namespace}asset-img asset-img">
153 <img src="${imageUrl}" onclick="${dlfileModalPopup}" class="asset-image" >
154 </div>
155 <#else>
156 <#if (imageUrl != "") || (videoUrl != "")>
157 <div class="${namespace}asset-img asset-img">
158 <#if (videoUrl != "")>
159 <div class="video-modal video-click-popup" href="${videoUrl}">
160 <#else>
161 <#if (imageUrl != "")>
162 <a href="${viewURL}" target="_blank" ${linkTarget}>
163 </#if>
164 </#if>
165
166 <#if (imageUrl != "")>
167 <img src="${imageUrl}" class="asset-image" >
168 </#if>
169
170 <#if (videoUrl != "")>
171 </div>
172 <#else>
173 <#if (imageUrl != "")>
174 </a>
175 </#if>
176 </#if>
177 </div>
178 </#if>
179 </#if>
180<div class="asset-icon"> </div>
181 <div class="asset-abstract">
182 <div class="lfr-meta-actions asset-actions">
183 <@getEditIcon />
184 </div>
185<#assign categoryName= "">
186<#if entry.getCategories()?has_content>
187 <#list entry.getCategories() as curCategory>
188 <#if curCategory.getVocabularyId() == vocabularyIdToUse>
189 <#assign categoryName= curCategory.getName()>
190 <#break>
191 </#if>
192 </#list>
193</#if>
194
195<#attempt>
196 <#if categoryIdParam?? && !validator.isNull(categoryIdParam) && validator.isNumber(categoryIdParam)>
197 <#assign categoryName = assetCategoryService.getCategory(categoryIdParam?number).getName()>
198 </#if>
199 <#recover>
200</#attempt>
201
202<#if categoryName?has_content>
203 <div class="asset-category">
204 <span class="content-pillar" style="background-color: #707070;">${categoryName}</span>
205 </div>
206</#if>
207 <div class="asset-title-image">
208 <#if (smallImageURL != "")>
209 <img alt="" src="${smallImageURL}" />
210 </#if>
211
212 <h3 class="title">
213 <#if dlfileModalPopup?has_content>
214 <a onclick="${dlfileModalPopup}">${entryTitle}</a>
215 <#else>
216 <a href="${viewURL}" ${linkTarget}>${entryTitle}</a>
217 </#if>
218 </h3>
219 </div>
220
221
222<div class="date-and-author"><span class="asset-date">
223 ${dateUtil.getDate(dateToUse, "MMMM dd, yyyy ", locale)}
224 </span><!--/
225 <span class="asset-author">
226 <@liferay.language key="written-by" /> ${htmlUtil.escape(portalUtil.getUserName(entry.getUserId(), entry.getUserName()))}
227 </span>-->
228 </div>
229 <div class="asset-content">
230
231
232 <div class="asset-summary">
233 <@getMetadataField fieldName="author" />
234
235 <#assign abstractTxt = htmlUtil.escape(assetRenderer.getSummary(locale)) >
236 <#-- <#assign abstractTxtLen = abstractTxt?length > 172 -->
237 <#if abstractTxt?length gt 172>
238 ${abstractTxt[0..172]}...
239 <!-- ${htmlUtil.escape(assetRenderer.getSummary(locale))} -->
240 <#else>
241 ${abstractTxt}
242 </#if>
243
244 </div>
245 <#if dlfileModalPopup?has_content>
246 <a onclick="${dlfileModalPopup}" class="more-link"><@liferay.language key="read-more" /><span class="hide-accessible"><@liferay.language key="about" />${entryTitle}</span></a>
247 <#else>
248
249 <a href="${viewURL}" ${linkTarget} class="more-link"><@liferay.language key="read-more" /><span class="hide-accessible"><@liferay.language key="about" />${entryTitle}</span></a>
250 </#if>
251
252 </div>
253 </div>
254 <div class="clearfix"></div>
255</div>
256</#list>
257</div>
258
259<script>
260 AUI().use('liferay-portlet-url', function(A) {
261
262 $(document).ready(function() {
263 if ($('#${namespace}info-wrapper').siblings('.lfr-pagination').find('ul.lfr-pagination-buttons a').length) {
264 $('#${namespace}info-wrapper').siblings('.lfr-pagination').find('ul.lfr-pagination-buttons a').attr('href', 'javascript:;');
265 $('#${namespace}info-wrapper').siblings('.lfr-pagination').attr('curParam', '1');
266 $('#${namespace}info-wrapper').siblings('.lfr-pagination').click(function() {
267 if ($(this).attr('curParam') === '1') {
268 $($(this).find('ul.lfr-pagination-buttons li')[0]).addClass('disabled');
269 } else {
270 $($(this).find('ul.lfr-pagination-buttons li')[0]).removeClass('disabled');
271 }
272 });
273
274 $($('#${namespace}info-wrapper').siblings('.lfr-pagination').find('ul.lfr-pagination-buttons a')[0]).click(function() {
275 if (!$(this).parent().hasClass('disabled')) {
276 var curParam = Number($(this).parents('.lfr-pagination').attr('curParam'));
277 if (Number(curParam) <= 1) {
278 return;
279 }
280 $(this).parents('ul.lfr-pagination-buttons').find('li:nth-child(2)').removeClass('disabled');
281 //console.log($(this).parents('ul.lfr-pagination-buttons').find('li:nth-child(2)'));
282 var nextURL = Liferay.PortletURL.createRenderURL();
283 $(this).parents('.lfr-pagination').attr('curParam', Number(curParam) - 1);
284 nextURL.setPortletId('${portletId}');
285 nextURL.setWindowState('exclusive');
286 nextURL.setParameter('cur', curParam - 1);
287 nextURL.setParameter('resetCur', '${resetCurParam}');
288 <#if categoryIdParam??>
289 nextURL.setParameter('categoryId', '${categoryIdParam}');
290 </#if>
291 //$('#${namespace}info-wrapper').load(nextURL.toString() + ' .info-wrapper');
292 $.ajax({
293 url: nextURL.toString(),
294 }).done(function( data ) {
295 Liferay.fire('activateTab', {tabId: $('#${namespace}info-wrapper').parents('div.content[tabNameValue]').attr('tabNameValue'), scrollToTab: true});
296 $('#${namespace}info-wrapper').html($(data).find('.info-wrapper').addBack('.info-wrapper').html());
297 if ($($(data).find('.lfr-pagination-buttons li')[1]).hasClass('disabled')) {
298 $($('#${namespace}info-wrapper').siblings('.lfr-pagination').find('ul.lfr-pagination-buttons li')[1]).addClass('disabled');
299
300 }
301 });
302 }
303 });
304 $($('#${namespace}info-wrapper').siblings('.lfr-pagination').find('ul.lfr-pagination-buttons a')[1]).click(function() {
305 //console.log('clicked ' + !$(this).hasClass("disabled"))
306 if (!$(this).parent().hasClass('disabled')) {
307 var nextURL = Liferay.PortletURL.createRenderURL();
308 var curParam = Number($(this).parents('.lfr-pagination').attr('curParam'));
309 $(this).parents('.lfr-pagination').attr('curParam', Number(curParam) + 1);
310 nextURL.setPortletId('${portletId}');
311 nextURL.setWindowState('exclusive');
312 nextURL.setParameter('cur', curParam + 1);
313 nextURL.setParameter('resetCur', '${resetCurParam}');
314 <#if categoryIdParam??>
315 nextURL.setParameter('categoryId', '${categoryIdParam}');
316 </#if>
317 //$('#${namespace}info-wrapper').load(nextURL.toString() + ' .info-wrapper');
318 $.ajax({
319 url: nextURL.toString(),
320 }).done(function( data ) {
321 $('#${namespace}info-wrapper').html($(data).find('.info-wrapper').addBack('.info-wrapper').html());
322 if ($($(data).find('.lfr-pagination-buttons li')[1]).hasClass('disabled')) {
323 $($('#${namespace}info-wrapper').siblings('.lfr-pagination').find('ul.lfr-pagination-buttons li')[1]).addClass('disabled');
324 }
325 Liferay.fire('activateTab', {tabId: $('#${namespace}info-wrapper').parents('div.content[tabNameValue]').attr('tabNameValue'), scrollToTab: true});
326 });
327 }
328 });
329 }
330
331 });
332 });
333 </script>
334
335<#macro getDiscussion>
336 <#if validator.isNotNull(assetRenderer.getDiscussionPath()) && (enableComments == "true")>
337 <br />
338
339 <#assign discussionURL = renderResponse.createActionURL() />
340
341 ${discussionURL.setParameter("struts_action", "/asset_publisher/" + assetRenderer.getDiscussionPath())}
342
343 <@liferay_ui["discussion"]
344 className=entry.getClassName()
345 classPK=entry.getClassPK()
346 formAction=discussionURL?string
347 formName="fm" + entry.getClassPK()
348 ratingsEnabled=enableCommentRatings == "true"
349 redirect=portalUtil.getCurrentURL(request)
350 userId=assetRenderer.getUserId()
351 />
352 </#if>
353</#macro>
354
355<#macro getEditIcon>
356 <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
357 <#assign redirectURL = renderResponse.createRenderURL() />
358
359 ${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")}
360 ${redirectURL.setWindowState("pop_up")}
361
362 <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" />
363
364 <#if validator.isNotNull(editPortletURL)>
365 <#assign title = languageUtil.format(locale, "edit-x", entryTitle) />
366
367 <@liferay_ui["icon"]
368 image="edit"
369 message=title
370 url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});"
371 />
372 </#if>
373 </#if>
374</#macro>
375
376<#macro getFlagsIcon>
377 <#if enableFlags == "true">
378 <@liferay_ui["flags"]
379 className=entry.getClassName()
380 classPK=entry.getClassPK()
381 contentTitle=entry.getTitle(locale)
382 label=false
383 reportedUserId=entry.getUserId()
384 />
385 </#if>
386</#macro>
387
388<#macro getMetadataField
389 fieldName
390>
391 <#if stringUtil.split(metadataFields)?seq_contains(fieldName)>
392 <span class="metadata-entry metadata-${fieldName}">
393 <#assign dateFormat = "dd MMM yyyy - HH:mm:ss" />
394
395 <#if fieldName == "author">
396 <@liferay.language key="by" /> ${portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName())}
397 <#elseif fieldName == "categories">
398 <@liferay_ui["asset-categories-summary"]
399 className=entry.getClassName()
400 classPK=entry.getClassPK()
401 portletURL=renderResponse.createRenderURL()
402 />
403 <#elseif fieldName == "create-date">
404 ${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale)}
405 <#elseif fieldName == "expiration-date">
406 ${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale)}
407 <#elseif fieldName == "modified-date">
408 ${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale)}
409 <#elseif fieldName == "priority">
410 ${entry.getPriority()}
411 <#elseif fieldName == "publish-date">
412 ${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)}
413 <#elseif fieldName == "tags">
414 <@liferay_ui["asset-tags-summary"]
415 className=entry.getClassName()
416 classPK=entry.getClassPK()
417 portletURL=renderResponse.createRenderURL()
418 />
419 <#elseif fieldName == "view-count">
420 <@liferay_ui["icon"]
421 image="history"
422 />
423
424 ${entry.getViewCount()} <@liferay.language key="views" />
425 </#if>
426 </span>
427 </#if>
428</#macro>
429
430<#macro getPrintIcon>
431 <#if enablePrint == "true" >
432 <#assign printURL = renderResponse.createRenderURL() />
433
434 ${printURL.setParameter("struts_action", "/asset_publisher/view_content")}
435 ${printURL.setParameter("assetEntryId", entry.getEntryId()?string)}
436 ${printURL.setParameter("viewMode", "print")}
437 ${printURL.setParameter("type", entry.getAssetRendererFactory().getType())}
438
439 <#if (validator.isNotNull(assetRenderer.getUrlTitle()))>
440 <#if (assetRenderer.getGroupId() != themeDisplay.getScopeGroupId())>
441 ${printURL.setParameter("groupId", assetRenderer.getGroupId()?string)}
442 </#if>
443
444 ${printURL.setParameter("urlTitle", assetRenderer.getUrlTitle())}
445 </#if>
446
447 ${printURL.setWindowState("pop_up")}
448
449 <@liferay_ui["icon"]
450 image="print"
451 message="print"
452 url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "printAsset', title: '" + languageUtil.format(locale, "print-x-x", ["hide-accessible", entryTitle]) + "', uri: '" + htmlUtil.escapeURL(printURL.toString()) + "'});"
453 />
454 </#if>
455</#macro>
456
457<#macro getRatings>
458 <#if (enableRatings == "true")>
459 <div class="asset-ratings">
460 <@liferay_ui["ratings"]
461 className=entry.getClassName()
462 classPK=entry.getClassPK()
463 />
464 </div>
465 </#if>
466</#macro>
467
468<#macro getRelatedAssets>
469 <#if enableRelatedAssets == "true">
470 <@liferay_ui["asset-links"]
471 assetEntryId=entry.getEntryId()
472 />
473 </#if>
474</#macro>
475
476<#macro getSocialBookmarks>
477 <#if enableSocialBookmarks == "true">
478 <@liferay_ui["social-bookmarks"]
479 displayStyle="${socialBookmarksDisplayStyle}"
480 target="_blank"
481 title=entry.getTitle(locale)
482 url=viewURL
483 />
484 </#if>
485</#macro>