Skip to content

Commit

Permalink
Change methods
Browse files Browse the repository at this point in the history
  • Loading branch information
portableant committed Oct 7, 2015
1 parent 44e286f commit 232962f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
6 changes: 3 additions & 3 deletions templates/account/public_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
{% else %}
<div class="row" id="user-data">
<h1><strong>{{user.fullname}}</strong></h1>
{{ helper.render_user_profile(user, settings=False, private=False) }}
{{ helper.render_user_profile(user, upload_method, settings=False, private=False) }}
</div>
{% if projects_created %}
<div class="row" id="created-apps" >
{{render_grid_projects(apps_created, "Created Projects")}}
{{render_grid_projects(projects_created, "Created Projects", upload_method)}}
</div>
{% endif %}
{% if projects %}
<div class="row" id="contributed-apps" >
{{render_grid_projects(projects, "Contributions")}}
{{render_grid_projects(projects, "Contributions", upload_method)}}
</div>
{% endif %}
{% endif %}
Expand Down
34 changes: 19 additions & 15 deletions templates/projects/_helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,26 @@ <h2><strong> {{_('Overall progress')}}</strong>: {{ overall_progress | round | i
{% endmacro %}

{% macro render_grid_projects(projects, title, upload_method) %}
<div class="row">
<h1>{{title}}</h1>
<div class="col-md-12">
{% for project in projects %}
<div class="col-md-3 center applications featured">
<a href={{ url_for('project.details', short_name=project.short_name)}}>
{{render_project_thumbnail(project, upload_method,
class="img-circle", style="width:140px; heigh=140px;")}}
</a>
<h2>{{project.name}}</h2>
<p>{{project.description}}</p>
<!-- <p><i class="glyphicon glyphicon-stats"></i> {{ _('With
contributions to ') }} <strong>{{project.n_answers}}</strong>
{{ _('task(s)') }}</p>-->
<div class="banner">
<div class="row-fluid">
<div class="span4">
<h1>{{title}}</h1>
</div>
<div class="span8">
<ul class="featured">
{% for project in projects %}
<li><a href={{ url_for('project.details', short_name=project.short_name)}}>
{{ render_project_thumbnail(project, upload_method, class='img-polaroid', style="min-height:100px; min-width:100px;")}}
<h3>{{project.name}}</h3>
<span class="label label-info">{{ _('Info') }}</span>
</a>
</li>
{% endfor %}
{% for number in range(18 - projects |count) %}
<li></li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
{% endmacro %}
Expand Down

0 comments on commit 232962f

Please sign in to comment.