Skip to content

Commit

Permalink
Added css style to SiteFaq index and category box
Browse files Browse the repository at this point in the history
The css file was already present, but not included in these boxes.
  • Loading branch information
Semias committed Jul 13, 2012
1 parent 4eaeab6 commit a6b5feb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions inc/app/sitefaq/boxes/category/index.php 100644 → 100755
Expand Up @@ -10,6 +10,8 @@

$res = db_fetch_array ('select * from sitefaq_question where category = ? order by question asc', $parameters['category']);

page_add_style ( site_prefix () . '/inc/app/sitefaq/html/faq.css' );

echo template_simple (
'category.spt',
array (
Expand Down
2 changes: 2 additions & 0 deletions inc/app/sitefaq/boxes/index/index.php 100644 → 100755
Expand Up @@ -15,6 +15,8 @@
$cats[$res[$k]->category][] = $res[$k];
}

page_add_style ( site_prefix () . '/inc/app/sitefaq/html/faq.css' );

echo template_simple (
'faq.spt',
array (
Expand Down
18 changes: 11 additions & 7 deletions inc/app/sitefaq/html/faq.spt 100644 → 100755
@@ -1,4 +1,5 @@
<script language="javascript" src="/js/jquery-ui-1.7.2.min.js"></script>

<script>
$(document).ready(function() {
$(".answer").hide();
Expand All @@ -16,6 +17,8 @@ $(document).ready(function() {
});
</script>

{box cms/buttons/add?collection=sitefaq_question&return=[site/current]}

{if appconf ('user_submissions')}
<div class="user_submissions">
<a href="{site/prefix}/index/sitefaq-submission-form">{intl Ask a Question}</a>
Expand All @@ -26,13 +29,14 @@ $(document).ready(function() {
{loop obj[cats]}
<div class="category">{loop/category}</div><br />
{loop obj[res]}
{if loop.category eq parent.category}
<div>
<a href="#" class="question">{loop/question}<br /></a>
<div class="answer" style="margin-bottom: 5px;">
{filter none}{loop/answer}{end filter}
<img src="{site/prefix}/inc/app/sitefaq/pix/close.gif" align="right" alt="{intl close}" class="closeimage" />&nbsp;
</div>
{if loop.category eq parent[category]}
{box cms/buttons?collection=sitefaq_question&id=[loop/id]&access=public&status=approved&team=none&add=false&float=true&return=[site/current]}
<div>
<a href="#" class="question">{loop/question}<br /></a>
<div class="answer" style="margin-bottom: 5px;">
{filter none}{loop/answer}{end filter}
<img src="{site/prefix}/inc/app/sitefaq/pix/close.gif" align="right" alt="{intl close}" class="closeimage" />&nbsp;
</div>
</div>
{end if}
{end loop}
Expand Down

0 comments on commit a6b5feb

Please sign in to comment.