media3-0/apki.org

View on GitHub
app/views/projects/mine.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title, " - Lista moich projektów" %>

<h2 class="text-center mrg20t" style="margin-bottom:50px;margin-bottom:60px">Lista moich projektów</h2>

<!-- This button is here and at the bottom of this page/file. Margin-top/bottom is only changed. -->
<div class="text-center" style="margin-bottom:30px"><a class="btn btn-primary" href="<%= new_project_path %>">Dodaj nowy projekt</a></div>

<div class="clearfix"></div>

<% @projects.each do |project| %>
<div class="col-md-4" ng-repeat="course in courses">
    <div class="fd-tile detail clean tile-purple course-tile project-tile" ng-click="checkCourse($event, course)">
        <div class="content">
            <img src="<% if project.icon.empty? %><%= asset_path('a_holder.png') %><% else %><%= project.icon %><% end %>" class="course-icon"><br>
            <h3><%= project.title %></h3><p><small><%= project.github %></small></p>
        </div>
        <a class="btn btn-tomka" href="<%= project_path(project) %>">
            <span>Zobacz</span>
            <span><i class="fa fa-arrow-circle-right pull-right"></i></span></a>
    </div>
</div>
<% end %>

<div class="clearfix"></div>

<!-- This button is here and at the top of this page/file. Margin-top/bottom is only changed. -->
<div class="text-center" style="margin-top:30px"><a class="btn btn-primary" href="<%= new_project_path %>">Dodaj nowy projekt</a></div>

<script type="text/javascript">
    $(function(){
        $('.project-tile').click(function(){
            location.assign($(this).find('a').attr('href'));
        });
    });
</script>