def get_content_item_template(self):
     config = self.get_unconfigured_config()
     controller = ActionController(config)
     sentiment_property = config['content_properties']['added'][0]
     return ""\
            "{{if " + controller._search_encode_property(sentiment_property) + "}}"\
            "    <li class='action_values tags'>"\
            "        <label><img src='" + config['image_small'] + "' style='position:relative;top:5px;left:-2px;width:16px;height:16px;'/>&nbsp;Tags:</label>&nbsp;"\
            "        <span style='font-weight:bold;'>"\
            "            {{each(index, element) " + controller._search_encode_property(sentiment_property) + "}}"\
            "                {{if element != '_none' && index < 5}}${element}{{/if}} {{if index == 6}}...{{/if}}"\
            "            {{/each}}"\
            "        </span>"\
            "    </li>"\
            "{{/if}}"
 def get_content_item_template(self):
     config = self.get_unconfigured_config()
     controller = ActionController(config)
     sentiment_property = config["content_properties"]["added"][0]
     encoded_property = controller._search_encode_property(sentiment_property)
     return (
         ""
         "{{if typeof (" + encoded_property + ") !== 'undefined'}}"
         "    {{if " + encoded_property + ".length > 0 && " + encoded_property + "[0] != '_none' }}"
         "    <li class='action_values tags'>"
         "        <label><img src='"
         + config["image_small"]
         + "' style='position:relative;top:5px;left:-2px;width:16px;height:16px;'/>&nbsp;Tags:</label>&nbsp;"
         "        <span style='font-weight:bold;'>"
         "            {{each(index, element) " + encoded_property + "}}"
         "                {{if element != '_none' && index < 5}}"
         "                    <a class='action_inline_filter' data-facet_name='"
         + encoded_property
         + "' data-facet_value='${element}'>${element}</a>"
         "                {{/if}} "
         "                {{if index == 6}}...{{/if}}"
         "            {{/each}}"
         "        </span>"
         "    </li>"
         "    {{/if}}"
         "{{/if}}"
     )
 def parse_actions(self):
     if not self.actions:
         return ''
     return_parts = []
     for raw_action in self.actions:
         ac = ActionController(raw_action)
         filters = ac.get_filters()
         basic_filters = [f for f in filters if f['type'] in ('string', 'location_string')]
         return_parts.append('&'.join(['facet.field=%s&f.%s.facet.mincount=1' % (ac._search_encode_property(f), ac._search_encode_property(f)) for f in basic_filters]))
     return_string = '&'.join(return_parts)
     return return_string
 def get_content_item_template(self):
     config = self.get_unconfigured_config()
     controller = ActionController(config)
     followers = config["content_properties"]["added"][0]
     sentiment = config["content_properties"]["added"][1]
     return (
         ""
         "{{if " + controller._search_encode_property(followers) + "}}"
         "    <li class='action_values'>"
         "        <label><img src='http://a0.twimg.com/profile_images/1865030972/Draftfcb-Logo-Small-V2_normal.jpg' style='position:relative;top:5px;left:-2px;width:16px;height:16px;'/>&nbsp;Followers:</label>&nbsp;"
         "        <span style='font-weight:bold;'>${" + controller._search_encode_property(followers) + "}</span>"
         "    </li>"
         "{{/if}}"
         "{{if " + controller._search_encode_property(sentiment) + "}}"
         "    <li class='action_values'>"
         "        <label><img src='http://a0.twimg.com/profile_images/1865030972/Draftfcb-Logo-Small-V2_normal.jpg' style='position:relative;top:5px;left:-2px;width:16px;height:16px;'/>&nbsp;Draft FCB Sentiment:</label>&nbsp;"
         "        <span style='font-weight:bold;'>${" + controller._search_encode_property(sentiment) + "}</span>"
         "    </li>"
         "{{/if}}"
         ""
     )
 def get_content_item_template(self):
     config = self.get_unconfigured_config()
     controller = ActionController(config)
     influence_property = config['content_properties']['added'][0]
     encoded_property = controller._search_encode_property(influence_property)
     return ""\
            "{{if typeof(" + encoded_property + ") !== 'undefined' && " + encoded_property + " != '_none'}}"\
            "    <li class='action_values influence'>"\
            "        <label><img src='" + config['image_small'] + "' style='position:relative;top:5px;left:-2px;width:16px;height:16px;'/>&nbsp;Influence:</label>&nbsp;"\
            "        <span style='font-weight:bold;'>"\
            "            <a class='action_inline_filter' data-facet_name='" + encoded_property + "' data-facet_value='${" + encoded_property + "}'>"\
            "                ${" + encoded_property + "}"\
            "            </a>"\
            "        </span>"\
            "    </li>"\
            "{{/if}}"
 def get_content_item_template(self):
     config = self.get_unconfigured_config()
     controller = ActionController(config)
     storyid = config['content_properties']['added'][0]
     language = config['content_properties']['added'][1]
     numberofwords = config['content_properties']['added'][2]
     numberofchars = config['content_properties']['added'][3]
     locations = config['content_properties']['added'][4]
     subjects = config['content_properties']['added'][5]
     industries = config['content_properties']['added'][6]
     companies = config['content_properties']['added'][7]
     people = config['content_properties']['added'][8]
     return "" \
         "<li class='action_values' style='padding-top:5px'><label>Language Code:</label> <b>${" + controller._search_encode_property(language) + "}</b></li> " \
         "<li class='action_values'><label>Character Count:</label> <b>${" + controller._search_encode_property(numberofchars) + "}</b></li> " \
         "{{if " + controller._search_encode_property(locations) + "}}"\
         "    <li class='action_values'>"\
         "        <label>locations:</label>&nbsp;"\
         "        <span style='font-weight:bold;'>"\
         "            {{each(index, element) " + controller._search_encode_property(locations) + "}}"\
         "                {{if element != '_none' && index < 5}}${element}{{/if}} {{if index == 6}}...{{/if}}"\
         "            {{/each}}"\
         "        </span>"\
         "    </li>"\
         "{{/if}}"\
         "{{if " + controller._search_encode_property(subjects) + "}}"\
         "    <li class='action_values'>"\
         "        <label>subjects:</label>&nbsp;"\
         "        <span style='font-weight:bold;'>"\
         "            {{each(index, element) " + controller._search_encode_property(subjects) + "}}"\
         "                {{if element != '_none' && index < 5}}${element}{{/if}} {{if index == 6}}...{{/if}}"\
         "            {{/each}}"\
         "        </span>"\
         "    </li>"\
         "{{/if}}"\
         "{{if " + controller._search_encode_property(industries) + "}}"\
         "    <li class='action_values'>"\
         "        <label>industries:</label>&nbsp;"\
         "        <span style='font-weight:bold;'>"\
         "            {{each(index, element) " + controller._search_encode_property(industries) + "}}"\
         "                {{if element != '_none' && index < 5}}${element}{{/if}} {{if index == 6}}...{{/if}}"\
         "            {{/each}}"\
         "        </span>"\
         "    </li>"\
         "{{/if}}"\
         "{{if " + controller._search_encode_property(companies) + "}}"\
         "    <li class='action_values'>"\
         "        <label>companies:</label>&nbsp;"\
         "        <span style='font-weight:bold;'>"\
         "            {{each(index, element) " + controller._search_encode_property(companies) + "}}"\
         "                {{if element != '_none' && index < 5}}${element}{{/if}} {{if index == 6}}...{{/if}}"\
         "            {{/each}}"\
         "        </span>"\
         "    </li>"\
         "{{/if}}"\
         "{{if " + controller._search_encode_property(people) + "}}"\
         "    <li class='action_values'>"\
         "        <label>people:</label>&nbsp;"\
         "        <span style='font-weight:bold;'>"\
         "            {{each(index, element) " + controller._search_encode_property(people) + "}}"\
         "                {{if element != '_none' && index < 5}}${element}{{/if}} {{if index == 6}}...{{/if}}"\
         "            {{/each}}"\
         "        </span>"\
         "    </li>"\
         "{{/if}}"