更改:项目活跃度排行默认统计一周内的数据
This commit is contained in:
parent
ae8b86ef02
commit
3f621bd5b5
|
@ -17,7 +17,7 @@ class Admins::ProjectsRankController < Admins::BaseController
|
||||||
private
|
private
|
||||||
|
|
||||||
def begin_date
|
def begin_date
|
||||||
params.fetch(:begin_date, Date.today.to_s)
|
params.fetch(:begin_date, (Date.today-7.days).to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
def end_date
|
def end_date
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<%= form_tag(admins_projects_rank_index_path, method: :get, class: 'form-inline search-form flex-1', id: 'project-rank-date-form') do %>
|
<%= form_tag(admins_projects_rank_index_path, method: :get, class: 'form-inline search-form flex-1', id: 'project-rank-date-form') do %>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">开始日期</span>
|
<span class="input-group-text">开始日期</span>
|
||||||
<input class="form-control datetimepicker" type="text" name="begin_date" value="<%= params[:begin_date] || Date.today.to_s%>" aria-label="选择日期">
|
<input class="form-control datetimepicker" type="text" name="begin_date" value="<%= params[:begin_date] || (Date.today - 7.days).to_s%>" aria-label="选择日期">
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">截止日期</span>
|
<span class="input-group-text">截止日期</span>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<tr class="">
|
<tr class="">
|
||||||
<td><%= index + 1%></td>
|
<td><%= index + 1%></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<%= "/#{item&.project&.owner&.login}/#{item&.project&.identifier}"%>">
|
<a target="_blank" href="<%= "/#{item&.project&.owner&.login}/#{item&.project&.identifier}"%>">
|
||||||
<%= "#{item&.project&.owner&.real_name}/#{item&.project&.name}" %>
|
<%= "#{item&.project&.owner&.real_name}/#{item&.project&.name}" %>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<td><%= index + 1%></td>
|
<td><%= index + 1%></td>
|
||||||
<% owner_common = $redis_cache.hgetall("v2-owner-common:#{item[0]}")%>
|
<% owner_common = $redis_cache.hgetall("v2-owner-common:#{item[0]}")%>
|
||||||
<td>
|
<td>
|
||||||
<a href="/<%= owner_common["login"] %>">
|
<a target="_blank" href="/<%= owner_common["login"] %>">
|
||||||
<%= owner_common["name"] %>
|
<%= owner_common["name"] %>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue