-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.php
More file actions
185 lines (175 loc) · 7.66 KB
/
index.php
File metadata and controls
185 lines (175 loc) · 7.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?php echo head(array('bodyid'=>'home')); ?>
<!-- chama o Exhibit Builder -->
<?php if ((get_theme_option('Display Featured Exhibit') !== '0')
&& plugin_is_active('ExhibitBuilder')
&& function_exists('exhibit_builder_display_random_featured_exhibit')): ?>
<!-- Featured Exhibit -->
<?php endif; ?>
<!-- Fim da chamada do Exhibit Builder -->
<!-- SLIDE -->
<div id="sli" class="row" role="slider">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators hidden-xs">
<!-- Função criada para buscar item por tags - criando a lista bolinha automaticamente-->
<?php
$items = get_records('Item', array('tags'=>'slider'), 20);
if ($items): ?>
<?php
$counti = 0;
foreach ($items as $item):
if($counti == '0'){ ?>
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<?php }
else{ ?>
<li data-target="#carousel-example-generic" data-slide-to="<?php echo $counti; ?>"></li>
<?php } ?>
<?php $counti++; ?>
<?php endforeach; ?>
<?php else: ?>
<p><?php echo __('No featured items are available.'); ?></p>
<?php endif; ?>
<!-- Fim da função -->
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<!-- Função criada para buscar item por tags - pegando imagens para o slider-->
<?php
$items = get_records('Item', array('tags'=>'slider'), 20);
if ($items): ?>
<?php
$count = 1;
foreach ($items as $item):
if($count == 1){ ?>
<div class="item active">
<?php }
else{ ?>
<div class="item">
<?php } ?>
<?php
$title = metadata($item, array('Dublin Core', 'Title'));
$description = metadata($item, array('Dublin Core', 'Description'), array('snippet' => 150));
?>
<!-- Parte da função que chama a foto -->
<?php $images = $item->Files; $imagesCount = 1; ?>
<?php if ($images): ?>
<?php foreach ($images as $image): ?>
<?php if ($imagesCount ==1): ?>
<div class="imgContainer"><img src="<?php echo url('/'); ?>files/original/<?php echo $image->filename; ?>"/></div>
<?php endif; ?>
<?php $imagesCount++; endforeach; ?>
<div class="carousel-caption">
<div id="box-green">
<h3><?php echo link_to($item, 'show', strip_formatting($title)); ?></h3>
<?php if ($description): ?>
<p class="item-description hidden-xs"><?php echo $description; ?>
<span> <?php echo link_to($item, 'show', strip_formatting('SAIBA MAIS')); ?></span>
</p>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<!-- Fim da chamada da foto -->
</div>
<?php $count++; ?>
<?php endforeach; ?>
<?php else: ?>
<p><?php echo __('No featured items are available.'); ?></p>
<?php endif; ?>
<!-- Fim da função -->
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev" style="color:#fff;">
<span class="glyphicon glyphicon-chevron-left " style="color:#fff;"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" style="color:#fff;"></span>
</a>
</div>
</div>
</div>
<!-- /SLIDE -->
<!-- Inicio Conteúdo central -->
<div class="container-fluid">
<div class="row toggle_bar">
<div class="cog-navigation">
<div class="col-md-6 col-xs-6" id="toggle_class">
<div id="link1" class="cog-nav-link clicado"><a class="info" href="#" type="button">Mais Recentes</a></div>
</div>
<div class="col-md-6 col-xs-6" id="toggle_class">
<div id="link2" class="cog-nav-link"><a class="gallery" href="#" type="button">Exposições em destaque</a></div>
</div>
</div>
</div>
<span id="seta1" class="seta1"></span>
<span id="seta2" class="nada"></span>
</div>
<!-- /Fim do conteúdo central -->
<div id="content" class="container">
<div class="row">
<div id="caixaTexto1" class="col-md-offset-1 col-md-11">
<div class='row'>
<div class='col-md-12'>
<div class="content" id="info">
<br/>
<?php
//Adicionados recentemente
$recentItems = get_theme_option('Homepage Recent Items');
if ($recentItems === null || $recentItems === ''):
$recentItems = 4;
else:
$recentItems = (int) $recentItems;
endif;
if ($recentItems):
?>
<div id="recent-items">
<?php echo recent_items($recentItems); ?>
</div><!--end recent-items -->
<?php endif; ?>
<?php fire_plugin_hook('public_home', array('view' => $this)); ?>
</div>
<div class="content" id="gallery">
<div id="recent-items">
<?php
//if ((get_theme_option('Display Featured Exhibit')) && function_exists('exhibit_builder_display_random_featured_exhibit')): ?>
<!-- Featured Exhibit -->
<?php //echo exhibit_builder_display_random_featured_exhibit(); ?>
<?php //endif; ?>
<?php
$exhibits=get_records('Exhibit' , array ('featured'=>true, 'sort'=>'recent'));
$i = 0;
foreach($exhibits as $exhibit):
if ($i == 0) echo '<div class="row">';
if ($i%4 == 0) echo '</div><div class="row">';?>
<div class="col-md-3">
<center>
<?php if ($exhibitImage = record_image($exhibit, 'square_thumbnail', array('class' => 'img-circle imgi'))): ?>
<?php echo exhibit_builder_link_to_exhibit($exhibit, $exhibitImage, array('class' => 'image')); ?>
<?php else: ?>
<div style="width: 200px; height: 200px; text-align:center; padding-top:3em; background:#fff;" class="img-circle tit_b"> </div>
<?php endif; ?>
<?php
echo '<center><h3 class="title_ini"><div id="title_center"><a href="/exhibits/show/'.$exhibit->slug.'">'.$exhibit->title.'</a></div></h3></center>';
$resumo_texto = $exhibit->description;
if((strlen($resumo_texto)) <150){
echo '<span class="item-description" style="text-align:justify;"><p>'.$resumo_texto.'</p></span>';
}
else{
echo '<span class="item-description" style="text-align:justify;"><p>'.substr($resumo_texto,0,150).'...</p></span>';
}
?>
</div>
<?php
$i++;
endforeach;
?>
</div>
</div>
</div></div>
</div>
</div>
</div>
</div>
</div>
<!--Inicio Rodapé -->
<?php echo foot(); ?>