Skip to content

Commit

Permalink
14.11.2013
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Rondio committed Nov 14, 2013
1 parent 7877825 commit 59d929c
Show file tree
Hide file tree
Showing 18 changed files with 395 additions and 623 deletions.
8 changes: 7 additions & 1 deletion _conf/English.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ emailRequired = "Email (will not be published) (required)"

# article.tpl
relatedArticles = "Related articles"
attachments = "Attachments"
attachments = "Attachments"
infoOnLockedArticles = "This article is locked and is accessible only to <mark>registered</mark> and <mark>logged in</mark> users, sorry!"


# article-debate.tpl
proArgumentsBy = "PRO arguments by:"
contraArgumentsBy = "CONTRA arguments by:"
49 changes: 49 additions & 0 deletions _css/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,53 @@

.content_text h3.role a{
color: #fabb86;
}

h3.debate_headline{
padding:10px 0px;
}

.debate_author{
background:#e8e8e8;
padding:15px ;
}

.debate_author figure{
width:90px;
float:left;
margin-right:10px;
}

.article_content .content_text .debate_author .debate_biography{

font-size:1em;
line-height:1.2em;

}

.debatte-score{
overflow: hidden;
margin: 0!important;
list-style-type: none;
padding: 0;
}

.debatte-score li{
display:inline-block;
}

.debatte-score li span{
padding:10px 20px;

display:block;
}

.debatte-score li.yes{
background-color: #005655;
color: #fabb85;
}

.debatte-score li.no{
background-color: #fabb85;
color: #005655;
}
7 changes: 7 additions & 0 deletions _css/elements.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@
line-height: 1em;
padding-bottom: 5px;
}
.news_item .content .topics {
color: #fabb85;
padding-top: 0px;
text-transform: uppercase;
line-height: 1.2em;
padding-bottom: 5px;
}

.news_item .content .title {

Expand Down
2 changes: 1 addition & 1 deletion _css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ a, input, textarea{
color:#005655;
}

.article_content .info a{
.article_content .info a, .article_content .topics a{
color:inherit;
}

Expand Down
2 changes: 1 addition & 1 deletion _tpl/_edit-article.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{dynamic}}
{{if $gimme->user->is_admin }}
<a style="text-decoration: none; border: 1px solid #ff7e00; position:absolute; color: #000; padding: 0px 3px; background:#ff7e00; font-family:sans; font-size:9px;"
<a style="text-decoration: none; border: 1px solid #ff7e00; color: #000; padding: 0px 3px; background:#ff7e00; font-family:sans; font-size:9px;"
href="http://{{ $gimme->publication->site }}/admin/articles/edit.php?f_publication_id={{ $gimme->publication->identifier }}&f_issue_number={{ $gimme->issue->number }}&f_section_number={{ $gimme->section->number }}&f_article_number={{ $gimme->article->number }}&f_language_id={{ $gimme->language->number }}&f_language_selected={{ $gimme->language->number }}" target="_blank"
style="" title="Edit article">
edit
Expand Down
9 changes: 9 additions & 0 deletions _tpl/debate-answers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ $answers = array() }}
{{ list_debate_answers order="bynumber asc" }}
{{ if empty($answers) }}
{{ $percent = floor($gimme->debateanswer->percentage) }}
{{ else }}
{{ $percent = ceil($gimme->debateanswer->percentage) }}
{{ /if }}
{{ $answers[] = ['answer' => $gimme->debateanswer->answer, 'percent' => $percent] }}
{{ /list_debate_answers }}
9 changes: 9 additions & 0 deletions _tpl/debate-deadline.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ $timestamp = sprintf('@%d', $gimme->debate->date_end) }}
{{ $closingdate=date_create($timestamp) }}
{{ $deadline=$closingdate->setTime(12, 0) }}
{{ $diff=date_diff($deadline, date_create('now')) }}
{{ if $deadline->getTimestamp() > time() }}
<p>{{ $diff->days }} {{ #days# }}, {{ $diff->h }} {{ #hours# }}, {{ $diff->i }} {{ #minutes# }} more {{ if $gimme->article->comment_count }}<span class="comm">{{ $gimme->article->comment_count }}</span>{{ /if }}</p>
{{ else }}
<p>Discussion closed on {{ $deadline->format('j.n.Y') }} at noon {{ if $gimme->article->comment_count }}<a href="{{ url}}#comments"><span class="comm">{{ $gimme->article->comment_count }}</span></a>{{ /if }}</p>
{{ /if }}
16 changes: 16 additions & 0 deletions _tpl/debate-votes-total.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ include file="_tpl/debate-answers.tpl" scope="parent" }}

{{ capture name="votes" }}
<ul class="debatte-score">
{{ strip }}
{{ foreach $answers as $answer }}
<li style="width:{{ $answer.percent }}%;" class="{{ if $answer@first }}yes{{ else }}no{{ /if }}"><span><b>{{ $answer.answer|escape }}</b> {{ $answer.percent }}%</span></li>
{{ /foreach }}
{{ /strip }}
</ul>
{{ /capture }}

{{ if !$gimme->debate->is_votable }}
{{ $smarty.capture.votes }}
<small>{{ if $gimme->debate->is_current && !$gimme->user->logged_in }}Current result{{ else }}Final result{{ /if }}</small>
{{ /if }}
41 changes: 41 additions & 0 deletions _tpl/debate-voting.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{ list_debates length="1" item="article" }}

<div id="debate" class="clearfix score-box">
<h3>{{ #debateVoting# }}</h3>

{{ include file="_tpl/debate-votes-total.tpl" scope="parent" }}

{{ if $gimme->debate->is_votable }}
{{ $smarty.capture.votes }}
{{ include file="_tpl/debate-deadline.tpl" }}
{{ /if }}


{{ if $gimme->default_article->defined }}
<div class="vote-box">
<div class="button-group">
{{ if $gimme->debate->is_votable }}
{{ debate_form template="article.tpl" submit_button=false }}
{{ list_debate_answers order="bynumber asc" }}

<a onclick="$('#answer-{{ $gimme->debateanswer->number }}').attr('checked','checked');$(this).parents('form:eq(0)').submit(); return false;" href="javascript:void(0)" class="button debbut">{{ $gimme->debateanswer->answer }}</a>

<!-- f_debateanswer_nr name mandatory -->
<input type="radio" name="f_debateanswer_nr"
value="{{ $gimme->debateanswer->number }}" id="answer-{{ $gimme->debateanswer->number }}"
onclick="$(this).parents('form:eq(0)').submit();" style="display:none" />

{{ /list_debate_answers }}
<input type="submit" id="submit-debate" class="button" value="~" style="display:none" />
{{ /debate_form }}
{{ /if }}

</div>
</div>
{{ if $gimme->debate->is_votable }}<small>{{ #changeYourMind# }}</small>
{{ elseif $gimme->user->logged_in or !$gimme->debate->is_current }}<small>{{ #debateClosed# }}</small>
{{ elseif $gimme->debate->is_current && !$gimme->user->logged_in }}<small>{{ #pleaseLoginVote# }}</small>{{ /if }}
{{ /if }}

</div>
{{ /list_debates }}
53 changes: 53 additions & 0 deletions _tpl/topic_cont.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{{ config_load file="{{ $gimme->language->english_name }}.conf" }}
<div class="bloger_news_items">
<div class="space_left_content">
<ul>
{{ list_articles ignore_issue="true" ignore_section="true" order="byPublishDate desc" length="10" }}

{{if $gimme->current_list->index==4}}
<li class="news_item">

</li>
{{/if}}
<li class="news_item">
<div class="content content_text">

{{ image rendition="section" }}
<a href="{{url options="article"}}" class="thumbnail">

<img src="{{ $image->src }}" alt="{{ $image->caption }} (photo: {{ $image->photographer }})" />
{{ include file="_tpl/article_icons.tpl" }}
</a>
{{/image}}



<h6 class="info">{{list_article_authors}}
{{if $gimme->current_list->index!=1}},&nbsp;{{/if}}

{{ if $gimme->author->biography->first_name }}
{{ $gimme->author->biography->first_name }} {{
$gimme->author->biography->last_name }}
{{ else }}
{{ $gimme->author->name }}
{{ /if }}
{{if $gimme->current_list->at_end}}
&nbsp;-&nbsp;{{/if}}{{/list_article_authors}}{{ $gimme->article->publish_date|camp_date_format:"%d.%m.%Y, %H:%i" }}</h6>
<h3 class="title"><a href="{{url options="article"}}">{{$gimme->article->name}}</a></h3>

<p>{{$gimme->article->deck|strip_tags}}</p>
</div>
</li>

{{if $gimme->current_list->at_end}}



</ul>
</div>
</div>

{{ include file="_tpl/pagination.tpl" }}
{{/if}}

{{/list_articles}}
Loading

0 comments on commit 59d929c

Please sign in to comment.