commit
3313adb13a
@ -0,0 +1,50 @@
|
||||
<h3 style="float: left">
|
||||
<%=l(:label_school_plural)%>
|
||||
</h3>
|
||||
<%= form_tag({:controller => 'admin', :action => 'schools' }, :method => :get,:id=>"search_course_form") do %>
|
||||
<%= submit_tag "搜索",:style => "float: right;margin-right: 15px;"%>
|
||||
<input style="float: right;margin-right: 10px;" id="v_subject" placeholder="学校名称" type="text" name="school_name" value="<%= @school_name%>">
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="autoscroll" style="margin-top: 40px;">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px;">
|
||||
序号
|
||||
</th>
|
||||
<th style="width: 100px;">
|
||||
LOGO
|
||||
</th>
|
||||
<th>
|
||||
学校名称
|
||||
</th>
|
||||
<th style="width: 100px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @schools.each do |school|%>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td style="text-align:center;vertical-align: middle;">
|
||||
<%= school.id %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%= image_tag(school.logo_link,width:40,height:40) %>
|
||||
</td>
|
||||
<td style="text-align:center;vertical-align: middle;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=school.name%>'>
|
||||
<span>
|
||||
<%= link_to school.name,"http://#{Setting.host_course}/?school_id=#{school.id}" %>
|
||||
</span>
|
||||
</td>
|
||||
<td class="buttons" style="vertical-align: middle;">
|
||||
<%= link_to("修改", upload_logo_school_path(school.id,:school_name => @school_name), :class => 'icon icon-copy') %>
|
||||
<%#= link_to(l(:button_delete), organization_path(school.id), :method => :delete,:confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end%>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_project_plural)) -%>
|
@ -1,11 +1,30 @@
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_statistics) %></h2>
|
||||
</div>
|
||||
<p>
|
||||
<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
|
||||
</p>
|
||||
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
||||
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
||||
<% if @status_commit_count ==0 %>
|
||||
<div class="flash notice">该项目目前还没有提交过代码!</div>
|
||||
<% else %>
|
||||
<div class="riviseRed fl"></div><div class="fl">修订 是版本库的提交次数, 显示为橘红色。</div><br>
|
||||
<div class="changeBlue fl"></div><div class="fl">变更 是对版本库中文件的修改次数, 显示为蓝色。</div>
|
||||
|
||||
<p style="padding-top:35px;">
|
||||
<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%# 用户每月提交代码次数 %>
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%# 用户最近六个月的提交次数 %>
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %>
|
||||
</p>
|
||||
<p style="padding-top: 50px;">
|
||||
<%# 用户最近六个月的代码量 %>
|
||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %>
|
||||
</p>
|
||||
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
||||
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
||||
<% end %>
|
@ -1,5 +1,28 @@
|
||||
<%= form_tag({action: :upload},method: "post", multipart: true) do %>
|
||||
<%= text_field_tag 'school'%>
|
||||
<%= file_field_tag 'logo' %>
|
||||
<%= submit_tag('Upload') %>
|
||||
<script>
|
||||
function showPreview(source) {
|
||||
var file = source.files[0];
|
||||
if(window.FileReader) {
|
||||
var fr = new FileReader();
|
||||
fr.onloadend = function(e) {
|
||||
document.getElementById("avatar_image").src = e.target.result;
|
||||
};
|
||||
fr.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<%= form_tag(upload_school_path(@school.id),method: "post", multipart: true) do %>
|
||||
<%#= text_field_tag 'school'%>
|
||||
<div style="margin: 20px;">
|
||||
<input type="hidden" value="<%= @school_name%>" name="school_name">
|
||||
<%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar")%>
|
||||
<a type="button" onclick="$('#file').click();" style="margin: 90px 0 0 10px;float: left;padding: 2px 5px;border: 1px solid #eaeaea;cursor: pointer;text-decoration: none;width: 55px;">上传图片</a>
|
||||
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
|
||||
<div style="clear: both;"></div>
|
||||
<div style="margin-top: 10px;">
|
||||
<%= submit_tag('上传') %>
|
||||
<%= submit_tag('取消') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
Loading…
Reference in new issue