Merge pull request #299 from warpc/279-new_design_for_platforms
[Refs #279] new design for platforms
This commit is contained in:
commit
8acb512a2e
|
@ -3,6 +3,7 @@
|
|||
//= require jquery-ui
|
||||
//= require autocomplete-rails
|
||||
//= require vendor
|
||||
//= require jquery.dataTables_ext
|
||||
//= require_tree ./design
|
||||
//= require_tree ./extra
|
||||
//= require_self
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
(function($, window, document, undefined) {
|
||||
$.extend( $.fn.DataTable.ext.oPagination, {
|
||||
"will_paginate_like": {
|
||||
/*
|
||||
* Function: oPagination.full_numbers.fnInit
|
||||
* Purpose: Initialise dom elements required for pagination with a list of the pages
|
||||
* Returns: -
|
||||
* Inputs: object:oSettings - dataTables settings object
|
||||
* node:nPaging - the DIV which contains this pagination control
|
||||
* function:fnCallbackDraw - draw function which must be called on update
|
||||
*/
|
||||
"fnInit": function ( oSettings, nPaging, fnCallbackDraw ) {
|
||||
var oLang = oSettings.oLanguage.oPaginate;
|
||||
var oClasses = oSettings.oClasses;
|
||||
var fnClickHandler = function ( e ) {
|
||||
if ( oSettings.oApi._fnPageChange( oSettings, e.data.action ) )
|
||||
{
|
||||
fnCallbackDraw( oSettings );
|
||||
}
|
||||
};
|
||||
|
||||
$(nPaging).append(
|
||||
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPagePrevious+'">'+oLang.sPrevious+'</a>'+
|
||||
'<span></span>'+
|
||||
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+" "+oClasses.sPageNext+'">'+oLang.sNext+'</a>'
|
||||
);
|
||||
var els = $('a', nPaging);
|
||||
var nPrev = els[0],
|
||||
nNext = els[1]
|
||||
|
||||
oSettings.oApi._fnBindAction( nPrev, {action: "previous"}, fnClickHandler );
|
||||
oSettings.oApi._fnBindAction( nNext, {action: "next"}, fnClickHandler );
|
||||
|
||||
/* ID the first elements only */
|
||||
if ( !oSettings.aanFeatures.p )
|
||||
{
|
||||
nPaging.id = oSettings.sTableId+'_paginate';
|
||||
nPrev.id =oSettings.sTableId+'_previous';
|
||||
nNext.id =oSettings.sTableId+'_next';
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: oPagination.full_numbers.fnUpdate
|
||||
* Purpose: Update the list of page buttons shows
|
||||
* Returns: -
|
||||
* Inputs: object:oSettings - dataTables settings object
|
||||
* function:fnCallbackDraw - draw function to call on page change
|
||||
*/
|
||||
"fnUpdate": function ( oSettings, fnCallbackDraw ) {
|
||||
if ( !oSettings.aanFeatures.p )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var iPageCount = $.fn.DataTable.ext.oPagination.iFullNumbersShowPages;
|
||||
var iPageCountHalf = Math.floor(iPageCount / 2);
|
||||
var iPages = Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength);
|
||||
var iCurrentPage = Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength) + 1;
|
||||
var sList = "";
|
||||
var iStartButton, iEndButton, i, iLen;
|
||||
var oClasses = oSettings.oClasses;
|
||||
var anButtons, anStatic, nPaginateList;
|
||||
var an = oSettings.aanFeatures.p;
|
||||
var fnBind = function (j) {
|
||||
oSettings.oApi._fnBindAction( this, {"page": j+iStartButton-1}, function(e) {
|
||||
/* Use the information in the element to jump to the required page */
|
||||
oSettings.oApi._fnPageChange( oSettings, e.data.page );
|
||||
fnCallbackDraw( oSettings );
|
||||
e.preventDefault();
|
||||
} );
|
||||
};
|
||||
|
||||
/* Pages calculation */
|
||||
if (iPages < iPageCount)
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = iPages;
|
||||
}
|
||||
else if (iCurrentPage <= iPageCountHalf)
|
||||
{
|
||||
iStartButton = 1;
|
||||
iEndButton = iPageCount;
|
||||
}
|
||||
else if (iCurrentPage >= (iPages - iPageCountHalf))
|
||||
{
|
||||
iStartButton = iPages - iPageCount + 1;
|
||||
iEndButton = iPages;
|
||||
}
|
||||
else
|
||||
{
|
||||
iStartButton = iCurrentPage - Math.ceil(iPageCount / 2) + 1;
|
||||
iEndButton = iStartButton + iPageCount - 1;
|
||||
}
|
||||
|
||||
/* Build the dynamic list */
|
||||
for ( i=iStartButton ; i<=iEndButton ; i++ )
|
||||
{
|
||||
sList += (iCurrentPage !== i) ?
|
||||
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButton+'">'+oSettings.fnFormatNumber(i)+'</a>' :
|
||||
'<a tabindex="'+oSettings.iTabIndex+'" class="'+oClasses.sPageButtonActive+'">'+oSettings.fnFormatNumber(i)+'</a>';
|
||||
}
|
||||
|
||||
/* Loop over each instance of the pager */
|
||||
for ( i=0, iLen=an.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( an[i].childNodes.length === 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Build up the dynamic list forst - html and listeners */
|
||||
$('span:eq(0)', an[i])
|
||||
.html( sList )
|
||||
.children('a').each( fnBind );
|
||||
|
||||
/* Update the premanent botton's classes */
|
||||
anButtons = an[i].getElementsByTagName('a');
|
||||
anStatic = [
|
||||
anButtons[0], anButtons[anButtons.length-1]
|
||||
];
|
||||
|
||||
$(anStatic).removeClass( oClasses.sPageButton+" "+oClasses.sPageButtonActive+" "+oClasses.sPageButtonStaticDisabled );
|
||||
$([anStatic[0]]).addClass(
|
||||
(iCurrentPage==1) ?
|
||||
oClasses.sPageButtonStaticDisabled :
|
||||
oClasses.sPageButton
|
||||
);
|
||||
$([anStatic[1]]).addClass(
|
||||
(iPages===0 || iCurrentPage===iPages || oSettings._iDisplayLength===-1) ?
|
||||
oClasses.sPageButtonStaticDisabled :
|
||||
oClasses.sPageButton
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} );
|
||||
}(jQuery, window, document, undefined));
|
|
@ -443,4 +443,118 @@ table.wiki .history .td2 .name span.username {
|
|||
width: 164px;
|
||||
}
|
||||
|
||||
table.tablesorter.platforms .th1 {
|
||||
width: 290px;
|
||||
}
|
||||
|
||||
table.tablesorter.platforms .th2 {
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
table.tablesorter tr td.buttons {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.tablesorter tr td.buttons a span.delete {
|
||||
background: image-url('x.png') no-repeat 0 0 transparent;
|
||||
width: 12px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#fork-and-edit {display:block;}
|
||||
|
||||
a.button.left_floated {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
div.buttons_block {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
table.tablesorter.unbordered {
|
||||
border: none;
|
||||
}
|
||||
|
||||
table.tablesorter.unbordered tr td {
|
||||
border: none;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
table.tablesorter.repo-projects th.th1 {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
table.tablesorter.repo-projects th.th3 {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
table.tablesorter.repo-projects td.td2,
|
||||
.table-sort-right {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.dataTables_filter {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
div.dataTables_paginate {
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.dataTables_info {
|
||||
float: right;
|
||||
}
|
||||
|
||||
div.dataTables_info,
|
||||
div.dataTables_paginate.paging_will_paginate_like {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
div.dataTables_paginate.paging_will_paginate_like a.paginate_button,
|
||||
div.dataTables_paginate.paging_will_paginate_like a.paginate_active {
|
||||
background: none repeat scroll 0 0 #EDEDED;
|
||||
color: #4C90D0 !important;
|
||||
border: 1px solid #DDDDDD;
|
||||
border-radius: 1px 1px 1px 1px;
|
||||
padding: 3px 7px;
|
||||
margin-right: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.dataTables_paginate.paging_will_paginate_like a.paginate_button_disabled,
|
||||
div.dataTables_paginate.paging_will_paginate_like a.paginate_active {
|
||||
color: #565657 !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
div.dataTables_paginate.paging_will_paginate_like a.paginate_button_disabled:hover,
|
||||
div.dataTables_paginate.paging_will_paginate_like a.paginate_active:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.dataTables_paginate.paging_will_paginate_like a.previous {
|
||||
margin-left: 0px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
div.dataTables_paginate.paging_will_paginate_like a.next {
|
||||
margin-left: 1px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
div.dataTables_paginate.paging_will_paginate_like a.paginate_active {
|
||||
background: none repeat scroll 0 0 #D5E7F9;
|
||||
border: 1px solid #C1DAED;
|
||||
}
|
||||
|
||||
div.dataTables_processing {
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
div.rightlist textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class PlatformsController < ApplicationController
|
|||
end
|
||||
|
||||
def index
|
||||
@platforms = Platform.accessible_by(current_ability).paginate(:page => params[:platform_page])
|
||||
@platforms = @platforms.paginate(:page => params[:page], :per_page => 20)
|
||||
end
|
||||
|
||||
def easy_urpmi
|
||||
|
@ -35,8 +35,8 @@ class PlatformsController < ApplicationController
|
|||
|
||||
def show
|
||||
@platform = Platform.find params[:id], :include => :repositories
|
||||
@repositories = @platform.repositories
|
||||
@members = @platform.members.uniq
|
||||
#@repositories = @platform.repositories
|
||||
#@members = @platform.members.uniq
|
||||
end
|
||||
|
||||
def new
|
||||
|
@ -44,7 +44,7 @@ class PlatformsController < ApplicationController
|
|||
@admin_uname = current_user.uname
|
||||
@admin_id = current_user.id
|
||||
end
|
||||
|
||||
|
||||
def edit
|
||||
@admin_id = @platform.owner.id
|
||||
@admin_uname = @platform.owner.uname
|
||||
|
|
|
@ -8,6 +8,10 @@ class ProductsController < ApplicationController
|
|||
load_and_authorize_resource :platform
|
||||
load_and_authorize_resource :product, :through => :platform
|
||||
|
||||
def index
|
||||
@products = @products.paginate(:page => params[:page])
|
||||
end
|
||||
|
||||
def new
|
||||
@product = @platform.products.new
|
||||
@product.ks = DEFAULT_KS
|
||||
|
|
|
@ -12,9 +12,9 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
def index
|
||||
if params[:platform_id]
|
||||
@repositories = Platform.find(params[:platform_id]).repositories.paginate(:page => params[:repository_page])
|
||||
@repositories = Platform.find(params[:platform_id]).repositories.paginate(:page => params[:page])
|
||||
else
|
||||
@repositories = Repository.paginate(:page => params[:repository_page])
|
||||
@repositories = Repository.paginate(:page => params[:page])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -60,7 +60,7 @@ class RepositoriesController < ApplicationController
|
|||
else
|
||||
flash[:error] = t('flash.repository.project_not_added')
|
||||
end
|
||||
redirect_to repository_path(@repository)
|
||||
redirect_to platform_repository_path(@platform, @repository)
|
||||
else
|
||||
render :projects_list
|
||||
end
|
||||
|
@ -96,7 +96,7 @@ class RepositoriesController < ApplicationController
|
|||
def remove_project
|
||||
@project = Project.find(params[:project_id])
|
||||
ProjectToRepository.where(:project_id => @project.id, :repository_id => @repository.id).destroy_all
|
||||
redirect_to repository_path(@repository), :notice => t('flash.repository.project_removed')
|
||||
redirect_to platform_repository_path(@platform, @repository), :notice => t('flash.repository.project_removed')
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
@ -18,6 +18,10 @@ module ApplicationHelper
|
|||
'right slim'
|
||||
when params[:controller] == 'build_lists' && ['new', 'create'].include?(params[:action])
|
||||
nil
|
||||
when params[:controller] == 'platforms' && params[:action] == 'show'
|
||||
'right bigpadding'
|
||||
when params[:controller] == 'platforms' && params[:action] == 'clone'
|
||||
'right middlepadding'
|
||||
else
|
||||
content_for?(:sidebar) ? 'right' : 'all'
|
||||
end
|
||||
|
|
|
@ -112,6 +112,14 @@ class User < ActiveRecord::Base
|
|||
email.downcase == commit.committer.email.downcase
|
||||
end
|
||||
|
||||
def owner_of? object
|
||||
if object.respond_to? :owner
|
||||
object.owner_id == self.id or self.group_ids.include? object.owner_id
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def create_settings_notifier
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
%tr{:id => "row#{build_list_counter}"}
|
||||
%td= link_to (build_list.bs_id.present? ? build_list.bs_id : t("layout.build_lists.bs_id_not_set")), build_list
|
||||
%td= build_list.human_status
|
||||
%td= link_to build_list.project.name, build_list.project
|
||||
%td= build_list.notified_at
|
|
@ -1,33 +1,29 @@
|
|||
- unless ['edit', 'update'].include? controller.action_name
|
||||
.group
|
||||
= f.label :name, :class => :label
|
||||
= f.text_field :name, :class => 'text_field'
|
||||
.leftlist= f.label :name, :class => :label
|
||||
.rightlist= f.text_field :name, :class => 'text_field'
|
||||
|
||||
.group
|
||||
= f.label :description, :class => :label
|
||||
= f.text_field :description, :class => 'text_field'
|
||||
.leftlist= f.label :description, :class => :label
|
||||
.rightlist= f.text_field :description, :class => 'text_field'
|
||||
|
||||
- unless ['edit', 'update'].include? controller.action_name
|
||||
.group
|
||||
= f.label :distrib_type, :class => :label
|
||||
= f.select :distrib_type, options_for_select(APP_CONFIG['distr_types'])
|
||||
.leftlist= f.label :distrib_type, :class => :label
|
||||
.rightlist= f.select :distrib_type, options_for_select(APP_CONFIG['distr_types'])
|
||||
|
||||
.group
|
||||
= f.label :parent, :class => :label
|
||||
= f.collection_select :parent_platform_id, Platform.all, :id, :description, :include_blank => true
|
||||
.leftlist= f.label :parent, :class => :label
|
||||
.rightlist= f.collection_select :parent_platform_id, Platform.all, :id, :description, :include_blank => true
|
||||
|
||||
.group
|
||||
= f.label :released, :class => :label
|
||||
= f.check_box :released, :class => 'check_box'
|
||||
.leftlist= f.label :released, :class => :label
|
||||
.rightlist= f.check_box :released, :class => 'check_box'
|
||||
|
||||
.group
|
||||
= label_tag "", t("layout.platforms.admin_id"), :class => :label
|
||||
= autocomplete_field_tag 'admin_id', @admin_uname, autocomplete_user_uname_platforms_path, :id_element => '#admin_id_field'
|
||||
= hidden_field_tag 'admin_id', @admin_id, :id => 'admin_id_field'
|
||||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
.leftlist= label_tag "", t("layout.platforms.admin_id"), :class => :label
|
||||
.rightlist= autocomplete_field_tag 'admin_id', @admin_uname, autocomplete_user_uname_platforms_path, :id_element => '#admin_id_field'
|
||||
= hidden_field_tag 'admin_id', @admin_id, :id => 'admin_id_field'
|
||||
.both
|
||||
|
||||
.button_block
|
||||
= submit_tag t("layout.clone")
|
||||
-#%input.button{:type => "submit", :class => "button"}
|
||||
-#= image_tag("choose.png", :alt => t("layout.save"))
|
||||
-#= t("layout.clone")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @platforms_path, :class => "text_button_padding link_button"
|
||||
= link_to t("layout.cancel"), @platforms_path, :class => "button"
|
||||
|
|
|
@ -1,4 +1,22 @@
|
|||
%table.table
|
||||
%table#myTable.tablesorter.platforms{:cellspacing => "0", :cellpadding => "0"}
|
||||
%thead
|
||||
%tr
|
||||
%th.th1= t("activerecord.attributes.platform.name")
|
||||
%th.th2= t("activerecord.attributes.platform.distrib_type")
|
||||
%th.th3= t("layout.delete")
|
||||
%tbody
|
||||
- @platforms.each do |platform|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td
|
||||
= link_to platform.name, platform_path(platform)
|
||||
%td
|
||||
= platform.distrib_type
|
||||
%td.buttons
|
||||
- if can? :destroy, platform
|
||||
= link_to platform_path(platform), :method => :delete, :confirm => t("layout.platforms.confirm_delete") do
|
||||
%span.delete
|
||||
|
||||
-#%table.table
|
||||
%tr
|
||||
%th.first= t("activerecord.attributes.platform.name")
|
||||
%th.first= t("activerecord.attributes.platform.distrib_type")
|
||||
|
|
|
@ -1,4 +1,20 @@
|
|||
.block.notice
|
||||
- act = action_name.to_sym
|
||||
- contr = controller_name.to_sym
|
||||
|
||||
- content_for :sidebar do
|
||||
%aside
|
||||
.admin-preferences
|
||||
%ul
|
||||
%li{:class => (act == :show && contr == :platforms) ? 'active' : ''}
|
||||
= link_to t("layout.platforms.about"), platform_path(@platform)
|
||||
%li{:class => (contr == :repositories) ? 'active' : ''}
|
||||
= link_to t("layout.repositories.list_header"), platform_repositories_path(@platform)
|
||||
%li{:class => (contr == :products) ? 'active' : ''}
|
||||
= link_to t("layout.products.list_header"), platform_products_path(@platform)
|
||||
-#- if current_user.owner_of? @platform or current_user.admin?
|
||||
%li{:class => (act == :index && contr == :private_users) ? 'active' : ''}
|
||||
= link_to t("layout.platforms.private_users"), platform_private_users_path(@platform)
|
||||
-#.block.notice
|
||||
%h3= t("layout.groups.members")
|
||||
.content
|
||||
- @platform.members.uniq.each do |member|
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
- content_for :submenu do
|
||||
- act = action_name.to_sym; contr = controller_name.to_sym
|
||||
.left= @platform.name
|
||||
%nav
|
||||
%ul
|
||||
- if can? :update, @platform
|
||||
%li= link_to t("platform_menu.settings"), edit_platform_path(@platform), :class => (act == :edit && contr == :platforms) ? 'active' : nil
|
|
@ -1,4 +1,23 @@
|
|||
.block
|
||||
= render :partial => 'submenu'
|
||||
= render :partial => 'sidebar'
|
||||
|
||||
= form_for @cloned, :url => make_clone_platform_path(@platform), :html => { :class => :form } do |f|
|
||||
.leftlist= f.label :name, :class => :label
|
||||
.rightlist= f.text_field :name, :class => 'text_field'
|
||||
|
||||
.leftlist= f.label :description, :class => :label
|
||||
.rightlist= f.text_field :description, :class => 'text_field'
|
||||
|
||||
.both
|
||||
|
||||
.button_block
|
||||
= submit_tag t("layout.clone")
|
||||
-#%input.button{:type => "submit", :class => "button"}
|
||||
-#= image_tag("choose.png", :alt => t("layout.save"))
|
||||
-#= t("layout.clone")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @platforms_path, :class => "button"
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to "#{t("layout.platforms.list")}", @platforms_path
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
.block
|
||||
= render :partial => 'submenu'
|
||||
= render :partial => 'sidebar'
|
||||
|
||||
= form_for @platform, :url => platform_path(@platform), :html => { :class => :form } do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.platforms.list"), platforms_path
|
||||
|
@ -10,4 +15,4 @@
|
|||
.inner
|
||||
= form_for @platform, :url => platform_path(@platform), :html => { :class => :form } do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
- content_for :sidebar, render(:partial => 'sidebar')
|
||||
-# content_for :sidebar, render(:partial => 'sidebar')
|
||||
|
|
|
@ -1,35 +1,3 @@
|
|||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.platforms.list"), platforms_path
|
||||
%li= link_to t("layout.platforms.new"), new_platform_path if can? :create, Platform
|
||||
.content
|
||||
%h2.title
|
||||
= t("layout.platforms.list_header")
|
||||
.inner
|
||||
= render :partial => 'shared/search_form'
|
||||
= render :partial => 'platforms/list', :object => @platforms
|
||||
.actions-bar.wat-cf
|
||||
.actions
|
||||
= will_paginate @platforms, :param_name => :platform_page
|
||||
/.block
|
||||
/ .secondary-navigation
|
||||
/ %ul.wat-cf
|
||||
/ %li.first.active= link_to t("layout.platforms.list"), platforms_path
|
||||
/ %li= link_to t("layout.platforms.new"), new_platform_path
|
||||
/ .content
|
||||
/ %h2.title
|
||||
/ = t("layout.platforms.list_header")
|
||||
/ .inner
|
||||
/ %table.table
|
||||
/ %tr
|
||||
/ %th.first= t("activerecord.attributes.platform.name")
|
||||
/ %th.last
|
||||
/ - @platforms.each do |platform|
|
||||
/ %tr{:class => cycle("odd", "even")}
|
||||
/ %td
|
||||
/ = link_to platform.name, platform_path(platform)
|
||||
/ %td.last
|
||||
/ #{link_to t("layout.show"), platform_path(platform)} | #{link_to t("layout.delete"), platform_path(platform), :method => :delete, :confirm => t("layout.platforms.confirm_delete")}
|
||||
/ .actions-bar.wat-cf
|
||||
/ .actions
|
||||
= link_to t("layout.platforms.new"), new_platform_path, :class => 'button' if can? :create, Platform
|
||||
= render :partial => 'platforms/list', :object => @platforms
|
||||
= will_paginate @platforms
|
||||
|
|
|
@ -1,4 +1,43 @@
|
|||
.block
|
||||
= render :partial => 'submenu'
|
||||
= render :partial => 'sidebar'
|
||||
|
||||
%h3.fix= t("layout.platforms.about")
|
||||
|
||||
%p= @platform.description
|
||||
|
||||
%table.tablesorter.unbordered
|
||||
- if @platform.parent
|
||||
%tr
|
||||
%td
|
||||
%b= "#{t("activerecord.attributes.platform.parent")}:"
|
||||
%td= link_to @platform.parent.description, platform_path(@platform.parent)
|
||||
%tr
|
||||
%td
|
||||
%b= "#{t('layout.platforms.owner')}:"
|
||||
%td= link_to @platform.owner.try(:name), url_for(@platform.owner)
|
||||
%tr
|
||||
%td
|
||||
%b= "#{t('layout.platforms.visibility')}:"
|
||||
%td= t("layout.visibilities.#{@platform.visibility}")
|
||||
%tr
|
||||
%td
|
||||
%b= "#{t('layout.platforms.platform_type')}:"
|
||||
%td= @platform.platform_type
|
||||
%tr
|
||||
%td
|
||||
%b= "#{t('layout.platforms.distrib_type')}:"
|
||||
%td= @platform.distrib_type
|
||||
|
||||
.buttons_block
|
||||
= link_to t("layout.platforms.build_all"), build_all_platform_path(@platform), :confirm => I18n.t("layout.confirm"), :method => :post, :class => "button left_floated" if can? :build_all, @platform
|
||||
- if @platform.released?
|
||||
= link_to t("layout.platforms.unfreeze"), unfreeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_unfreeze"), :method => :post, :class => "button left_floated" if can? :unfreeze, @platform
|
||||
- else
|
||||
= link_to t("layout.platforms.freeze"), freeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_freeze"), :method => :post, :class => "button left_floated" if can? :freeze, @platform
|
||||
= link_to "Клонировать", clone_platform_path(@platform), :class => "button left_floated" if can? :clone, @platform
|
||||
.both
|
||||
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.platforms.list"), platforms_path
|
||||
|
@ -66,8 +105,8 @@
|
|||
= link_to t("layout.platforms.build_all"), build_all_platform_path(@platform), :confirm => I18n.t("layout.confirm"), :method => :post, :class => "button" if can? :build_all, @platform
|
||||
= link_to t("layout.platforms.edit"), edit_platform_path(@platform), :class => "button" if can? :edit, @platform
|
||||
|
||||
%a{ :name => "repositories" }
|
||||
.block
|
||||
-#%a{ :name => "repositories" }
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.repositories.list"), platform_path(@platform) + "#repositories"
|
||||
|
@ -91,8 +130,8 @@
|
|||
.actions-bar.wat-cf
|
||||
.actions
|
||||
|
||||
%a{ :name => "producs" }
|
||||
.block
|
||||
-#%a{ :name => "producs" }
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.products.list"), platform_path(@platform) + "#products"
|
||||
|
@ -116,4 +155,4 @@
|
|||
=# (product.can_clone? ? "| #{link_to t("layout.products.clone"), clone_platform_product_path(@platform, product)}" : "").html_safe
|
||||
.actions-bar.wat-cf
|
||||
.actions
|
||||
- content_for :sidebar, render(:partial => 'sidebar')
|
||||
-# content_for :sidebar, render(:partial => 'sidebar')
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
}
|
||||
|
||||
|
||||
.group
|
||||
= form.check_box :use_cron
|
||||
= form.label :use_cron
|
||||
.leftlist= form.label :use_cron
|
||||
.rightlist= form.check_box :use_cron
|
||||
.both
|
||||
|
||||
#genereator_btn
|
||||
%a{ :href => "#" }= t("layout.products.cron_tab_generator.show")
|
||||
|
@ -144,7 +144,7 @@
|
|||
- Date::DAYNAMES.each_with_index do |day, index|
|
||||
%option{ :value => index, :selected => @product.cron_tab_weekdays.include?(index) }= t("layout.weekdays.#{day}")
|
||||
|
||||
.group
|
||||
= form.label :cron_tab, :class => :label
|
||||
= form.text_field :cron_tab, :id => "cron", :class => "text_field", :style => "width: 40%", :disabled => !@product.use_cron, :value => @product.cron_tab
|
||||
= @product.cron_command
|
||||
.leftlist= form.label :cron_tab, :class => :label
|
||||
.rightlist= form.text_field :cron_tab, :id => "cron", :class => "text_field", :style => "width: 40%", :disabled => !@product.use_cron, :value => @product.cron_tab
|
||||
= @product.cron_command
|
||||
.both
|
||||
|
|
|
@ -1,44 +1,55 @@
|
|||
.group
|
||||
= f.label :name, t("activerecord.attributes.product.name"), :class => :label
|
||||
= f.text_field :name, :class => 'text_field'
|
||||
.group
|
||||
= f.label :build_script, t("activerecord.attributes.product.build_script"), :class => :label
|
||||
= f.text_area :build_script, :class => 'text_field', :cols => 80
|
||||
.group
|
||||
= f.label :counter, t("activerecord.attributes.product.counter"), :class => :label
|
||||
= f.text_area :counter, :class => 'text_field', :cols => 80
|
||||
.group
|
||||
= f.label :ks, t("activerecord.attributes.product.ks"), :class => :label
|
||||
= f.text_area :ks, :class => 'text_field', :cols => 80
|
||||
.group
|
||||
= f.label :menu, t("activerecord.attributes.product.menu"), :class => :label
|
||||
= f.text_area :menu, :class => 'text_field', :cols => 80
|
||||
.group
|
||||
%p
|
||||
= f.label :tar, t("activerecord.attributes.product.tar"), :class => :label
|
||||
= f.file_field :tar, :class => 'file_field'
|
||||
%p
|
||||
- if @product.tar?
|
||||
= link_to @product.tar_file_name, @product.tar.url
|
||||
= f.check_box :delete_tar
|
||||
= f.label :delete_tar, t('layout.delete')
|
||||
.leftlist= f.label :name, t("activerecord.attributes.product.name"), :class => :label
|
||||
.rightlist= f.text_field :name, :class => 'text_field'
|
||||
.both
|
||||
|
||||
.group
|
||||
= render :partial => "products/crontab", :locals => { :form => f }
|
||||
.leftlist= f.label :description, t("activerecord.attributes.product.description"), :class => :label
|
||||
.rightlist= f.text_area :description, :class => 'text_field', :cols => 80
|
||||
.both
|
||||
|
||||
.leftlist= f.label :build_script, t("activerecord.attributes.product.build_script"), :class => :label
|
||||
.rightlist= f.text_area :build_script, :class => 'text_field', :cols => 80
|
||||
.both
|
||||
|
||||
.leftlist= f.label :counter, t("activerecord.attributes.product.counter"), :class => :label
|
||||
.rightlist= f.text_area :counter, :class => 'text_field', :cols => 80
|
||||
.both
|
||||
|
||||
.leftlist= f.label :ks, t("activerecord.attributes.product.ks"), :class => :label
|
||||
.rightlist= f.text_area :ks, :class => 'text_field', :cols => 80
|
||||
.both
|
||||
|
||||
.leftlist= f.label :menu, t("activerecord.attributes.product.menu"), :class => :label
|
||||
.rightlist= f.text_area :menu, :class => 'text_field', :cols => 80
|
||||
.both
|
||||
|
||||
%p
|
||||
.leftlist= f.label :tar, t("activerecord.attributes.product.tar"), :class => :label
|
||||
.rightlist= f.file_field :tar, :class => 'file_field'
|
||||
.both
|
||||
%p
|
||||
- if @product.tar?
|
||||
.leftlist= link_to @product.tar_file_name, @product.tar.url
|
||||
.both
|
||||
%br
|
||||
.leftlist= f.label :delete_tar, t('layout.delete')
|
||||
.rightlist= f.check_box :delete_tar
|
||||
.both
|
||||
|
||||
= render :partial => "products/crontab", :locals => { :form => f }
|
||||
|
||||
.group
|
||||
= f.label :is_template, :class => :label
|
||||
= f.check_box :is_template, :class => 'check_box'
|
||||
.leftlist= f.label :is_template, :class => :label
|
||||
.rightlist= f.check_box :is_template, :class => 'check_box'
|
||||
|
||||
- content_for :commented do
|
||||
.group
|
||||
= f.label :system_wide, :class => :label
|
||||
= f.check_box :system_wide, :class => 'check_box'
|
||||
.leftlist= f.label :system_wide, :class => :label
|
||||
.rightlist= f.check_box :system_wide, :class => 'check_box'
|
||||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
.both
|
||||
.button_block
|
||||
= submit_tag t("layout.save")
|
||||
-#%input.button{:type => "submit", :class => "button"}
|
||||
-#= image_tag("choose.png", :alt => t("layout.save"))
|
||||
-#= t("layout.clone")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), platform_path(@platform), :class => "text_button_padding link_button"
|
||||
= link_to t("layout.cancel"), platform_path(@platform), :class => "button"
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
%table#myTable.tablesorter.platform-products{:cellspacing => "0", :cellpadding => "0"}
|
||||
%thead
|
||||
%tr
|
||||
%th.th1= t("activerecord.attributes.product.name")
|
||||
%th= t("layout.delete")
|
||||
%tbody
|
||||
- @products.each do |product|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td
|
||||
= link_to product.name, platform_product_path(@platform, product)
|
||||
%td.buttons
|
||||
- if can? :destroy, product
|
||||
= link_to platform_product_path(@platform, product), :method => :delete, :confirm => t("layout.products.confirm_delete") do
|
||||
%span.delete
|
|
@ -1,4 +1,15 @@
|
|||
.block
|
||||
= render :partial => 'platforms/submenu'
|
||||
= render :partial => 'platforms/sidebar'
|
||||
|
||||
%h3
|
||||
= t("layout.products.edit_header")
|
||||
= link_to @product.name, platform_product_path(@platform, @product)
|
||||
%br
|
||||
|
||||
= form_for [@platform, @product], :html => { :class => :form, :multipart => true } do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to @platform.name, platform_path(@platform) + "#products"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
= render :partial => 'platforms/submenu' if params[:platform_id]
|
||||
= render :partial => 'platforms/sidebar' if params[:platform_id]
|
||||
= link_to t("layout.products.new"), new_platform_product_path(@platform), :class => 'button' if can? :create, @platform.products.build
|
||||
= render :partial => 'list', :object => @products
|
||||
= will_paginate @products
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
.block
|
||||
= render :partial => 'platforms/submenu'
|
||||
= render :partial => 'platforms/sidebar'
|
||||
|
||||
= form_for [@platform, @product], :html => { :class => :form, :multipart => true } do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to @platform.name, platform_path(@platform) + "#products"
|
||||
|
|
|
@ -1,4 +1,32 @@
|
|||
.block
|
||||
= render :partial => 'platforms/submenu'
|
||||
= render :partial => 'platforms/sidebar'
|
||||
|
||||
%h3= "#{t("layout.products.about")} #{@product.name}"
|
||||
|
||||
%p= @product.description
|
||||
|
||||
.buttons_block
|
||||
- if can? :update, @product
|
||||
= link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_platform_product_path(@platform, @product), :class => "button"
|
||||
- if can? :destroy, @product
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_product_path(@platform, @product), :method => "delete", :class => "button", :confirm => t("layout.products.confirm_delete")
|
||||
-# if @product.can_clone?
|
||||
=# link_to t("layout.products.clone"), clone_platform_product_path(@platform, @product), :class => "button"
|
||||
- if can?(:create, @product => ProductBuildList)
|
||||
= link_to t("layout.products.build"), platform_product_product_build_lists_path(@platform, @product), :class => "button", :method => 'post', :confirm => t("layout.confirm")
|
||||
|
||||
%h3= t("layout.products.build_lists_monitoring")
|
||||
|
||||
%table#myTable.tablesorter.platform-product-main{:cellspacing => "0", :cellpadding => "0"}
|
||||
%thead
|
||||
%tr
|
||||
%th.th1= t("activerecord.attributes.product_build_list.id")
|
||||
%th.th2= t("activerecord.attributes.product_build_list.status")
|
||||
%th.th3= t("layout.product_build_lists.action")
|
||||
%th.th4= t("activerecord.attributes.product_build_list.notified_at")
|
||||
%tbody
|
||||
= render @product.product_build_lists.default_order
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to @platform.name, platform_path(@platform) + "#products"
|
||||
|
@ -35,7 +63,7 @@
|
|||
- if can?(:create, @product => ProductBuildList)
|
||||
= link_to t("layout.products.build"), platform_product_product_build_lists_path(@platform, @product), :class => "button", :method => 'post', :confirm => t("layout.confirm")
|
||||
|
||||
.block
|
||||
-#.block
|
||||
.content
|
||||
.inner
|
||||
%table.table
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
.group
|
||||
= f.label :name, t("activerecord.attributes.repository.name"), :class => :label
|
||||
= f.text_field :name, :class => 'text_field'
|
||||
.group
|
||||
= f.label :description, t("activerecord.attributes.repository.description"), :class => :label
|
||||
= f.text_field :description, :class => 'text_field'
|
||||
.leftlist= f.label :name, t("activerecord.attributes.repository.name"), :class => :label
|
||||
.rightlist= f.text_field :name, :class => 'text_field'
|
||||
|
||||
.group.navform.wat-cf
|
||||
%button.button{:type => "submit"}
|
||||
= image_tag("choose.png", :alt => t("layout.save"))
|
||||
= t("layout.save")
|
||||
.leftlist= f.label :description, t("activerecord.attributes.repository.description"), :class => :label
|
||||
.rightlist= f.text_field :description, :class => 'text_field'
|
||||
|
||||
.both
|
||||
|
||||
.button_block
|
||||
= submit_tag t("layout.save")
|
||||
-#%input.button{:type => "submit", :class => "button"}
|
||||
-#= image_tag("choose.png", :alt => t("layout.save"))
|
||||
-#= t("layout.clone")
|
||||
%span.text_button_padding= t("layout.or")
|
||||
= link_to t("layout.cancel"), @repositories_path + "#repositories", :class => "text_button_padding link_button"
|
||||
|
||||
= link_to t("layout.cancel"), @repositories_path, :class => "button"
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
%table.table
|
||||
%table#myTable.tablesorter.platform-repos{:cellspacing => "0", :cellpadding => "0"}
|
||||
%thead
|
||||
%tr
|
||||
%th.th1= t("activerecord.attributes.repository.name")
|
||||
%th.th2= t("layout.repositories.projects")
|
||||
%th= t("layout.delete")
|
||||
%tbody
|
||||
- @repositories.each do |repository|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
%td
|
||||
= link_to repository.name, platform_repository_path(@platform, repository)
|
||||
%td
|
||||
= repository.projects.count
|
||||
%td.buttons
|
||||
- if can? :destroy, repository
|
||||
= link_to platform_repository_path(@platform, repository), :method => :delete, :confirm => t("layout.repositories.confirm_delete") do
|
||||
%span.delete
|
||||
-#%table.table
|
||||
%tr
|
||||
%th.first= t("activerecord.attributes.repository.name")
|
||||
%th.last
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
- columns = [{:type => 'html', :searchable => false}, {:type => 'html'}, {:type => nil, :sortable => false, :searchable => false}]
|
||||
= raw datatable(columns, {:sort_by => "[1, 'asc']", :search_label => t("layout.search_by_name"), :processing => t("layout.processing"),
|
||||
:pagination_labels => {:first => t("datatables.first_label"), :previous => t("datatables.previous_label"),
|
||||
:next => t("datatables.next_label"), :last => t("datatables.last_label")},
|
||||
:pagination_labels => {:previous => t("datatables.previous_label"), :next => t("datatables.next_label")},
|
||||
:empty_label => t("datatables.empty_label"),
|
||||
:info_label => t("datatables.info_label"),
|
||||
:info_empty_label => t("datatables.info_empty_label"),
|
||||
:filtered_label => t("datatables.filtered_label"),
|
||||
:table_dom_id => 'datatable',
|
||||
:auto_width => 'false',
|
||||
:ajax_source => "#{url_for :controller => :repositories, :action => :projects_list, :id => @repository.id}" })
|
||||
|
||||
%table.table.datatable
|
||||
%table#datatable.tablesorter.repo-projects{:cellspacing => 0, :cellpadding => 0}
|
||||
%thead
|
||||
%tr
|
||||
%th.first{:style => 'width: 80px'}= t("activerecord.attributes.user.uname")
|
||||
%th= t("activerecord.attributes.project.name")
|
||||
%th.last
|
||||
%th.th1= t("activerecord.attributes.user.uname")
|
||||
%th.th2= t("activerecord.attributes.project.name")
|
||||
%th.buttons
|
||||
%tbody
|
||||
%br
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
%table.table
|
||||
%table#myTable.tablesorter.repo-projects{:cellpadding => "0", :cellspacing => "0"}
|
||||
%thead
|
||||
%tr
|
||||
%th.th1= t("activerecord.attributes.project.name")
|
||||
%th.th2= t("activerecord.attributes.project.description")
|
||||
%th.th3= t("layout.remove")
|
||||
%tbody= render :partial => 'repositories/project', :collection => @projects
|
||||
|
||||
-#%table.tablesorter
|
||||
%tr
|
||||
%th.first= t("activerecord.attributes.project.name")
|
||||
%th.
|
||||
%th.last
|
||||
- @projects.each do |project|
|
||||
%tr{:class => cycle("odd", "even")}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
%tr{:id => "Row#{project_counter}", :class => cycle('odd', 'even')}
|
||||
%td
|
||||
= link_to project do
|
||||
.table-sort-left= image_tag visibility_icon(project.visibility)
|
||||
.table-sort-right #{project.owner.uname} / #{project.name}
|
||||
%td.td2
|
||||
%span= project.description
|
||||
%td.buttons
|
||||
= link_to remove_project_repository_path(@repository, :project_id => project.id), :method => :delete, :confirm => t("layout.confirm") do
|
||||
%span.delete
|
|
@ -1,4 +1,9 @@
|
|||
.block
|
||||
= render :partial => 'platforms/submenu' if params[:platform_id]
|
||||
= render :partial => 'platforms/sidebar' if params[:platform_id]
|
||||
= link_to t("layout.repositories.new"), new_platform_repository_path(@platform), :class => 'button' if can? :create, @platform.repositories.build
|
||||
= render :partial => 'list', :object => @repositories
|
||||
= will_paginate @repositories
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.repositories.list"), repositories_path
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
.block
|
||||
= render :partial => 'platforms/submenu'
|
||||
= render :partial => 'platforms/sidebar'
|
||||
|
||||
%h3= t("layout.repositories.new_header")
|
||||
|
||||
= form_for :repository, :url => @repositories_path, :html => { :class => :form } do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.repositories.list"), @repositories_path + "#platforms"
|
||||
|
|
|
@ -1,45 +1,6 @@
|
|||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.repositories.list"), @repositories_path + "#repositories"
|
||||
%li= link_to t("layout.repositories.new"), @new_repository_path
|
||||
%li.active= link_to t("layout.repositories.show"), repository_path(@repository)
|
||||
.content
|
||||
.inner
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.name")
|
||||
\:
|
||||
= @repository.name
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.description")
|
||||
\:
|
||||
= @repository.description
|
||||
%p
|
||||
%b
|
||||
= t("activerecord.attributes.repository.platform")
|
||||
\:
|
||||
= link_to @repository.platform.description, url_for(@repository.platform)
|
||||
.wat-cf
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete")
|
||||
= render :partial => 'platforms/submenu'
|
||||
= render :partial => 'platforms/sidebar'
|
||||
|
||||
%a{ :name => "projects" }
|
||||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.projects.list"), repository_path(@repository) + "#projects"
|
||||
%li.active= link_to t("layout.projects.add"), url_for(:controller => :repositories, :action => :add_project)
|
||||
.content
|
||||
%h2.title
|
||||
= t("layout.projects.list_header")
|
||||
.inner
|
||||
-#= render :partial => 'shared/search_form'
|
||||
= render :partial => 'proj_list', :object => @projects
|
||||
-#.actions-bar.wat-cf
|
||||
.actions
|
||||
= will_paginate @projects, :param_name => :project_page
|
||||
|
||||
|
||||
-# content_for :sidebar, render(:partial => 'sidebar')
|
||||
%h3= "#{t("layout.repositories.add_project_to")}: #{@repository.name}"
|
||||
|
||||
= render :partial => 'proj_list', :object => @projects
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
.block
|
||||
= render :partial => 'platforms/submenu'
|
||||
= render :partial => 'platforms/sidebar'
|
||||
|
||||
%h3.fix= "#{t("layout.repositories.about")}: #{@repository.name}"
|
||||
|
||||
%p= @platform.description
|
||||
|
||||
%br
|
||||
%br
|
||||
%h3.fix= t("layout.projects.list_header")
|
||||
= link_to t("layout.projects.add"), add_project_repository_path(@repository), :class => 'button'
|
||||
|
||||
= render :partial => 'proj_list1', :object => @projects
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.repositories.list"), @repositories_path + "#repositories"
|
||||
|
@ -24,8 +37,8 @@
|
|||
.wat-cf
|
||||
= link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), @repository_path, :method => "delete", :class => "button", :confirm => t("layout.repositories.confirm_delete") if can? :destroy, @repository
|
||||
|
||||
%a{ :name => "projects" }
|
||||
.block
|
||||
-#%a{ :name => "projects" }
|
||||
-#.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first.active= link_to t("layout.projects.list"), repository_path(@repository) + "#projects"
|
||||
|
|
|
@ -24,3 +24,6 @@ types = [
|
|||
types.each do |type|
|
||||
MIME::Types.add MIME::Type.from_array(type)
|
||||
end
|
||||
|
||||
# load datatables plugin
|
||||
require Rails.root.join("lib/rails_datatables")
|
||||
|
|
|
@ -11,3 +11,7 @@ en:
|
|||
read_write_access: read & write
|
||||
|
||||
by: by
|
||||
|
||||
visibilities:
|
||||
open: open
|
||||
hidden: hidden
|
||||
|
|
|
@ -11,3 +11,7 @@ ru:
|
|||
read_write_access: чтение и запись
|
||||
|
||||
by: ''
|
||||
|
||||
visibilities:
|
||||
open: открытая
|
||||
hidden: скрытая
|
||||
|
|
|
@ -26,4 +26,6 @@ en:
|
|||
tracker: Tracker
|
||||
wiki: Wiki
|
||||
readme: Readme
|
||||
settings: Settings
|
||||
settings: Settings
|
||||
platform_menu:
|
||||
settings: Settings
|
||||
|
|
|
@ -26,4 +26,6 @@ ru:
|
|||
tracker: Трекер
|
||||
wiki: Wiki
|
||||
readme: Readme
|
||||
settings: Настройки
|
||||
settings: Настройки
|
||||
platform_menu:
|
||||
settings: Настройки
|
||||
|
|
|
@ -6,6 +6,7 @@ en:
|
|||
list: List
|
||||
new: Create
|
||||
edit: Edit
|
||||
about: About platform
|
||||
new_header: New platform
|
||||
edit_header: Edit
|
||||
list_header: Platforms
|
||||
|
@ -22,7 +23,7 @@ en:
|
|||
freeze: Freeze
|
||||
unfreeze: Unfeeze
|
||||
confirm_freeze: Are you sure to freeze this platform?
|
||||
confirm_freeze: Are you sure to clone this platform?
|
||||
confirm_clone: Are you sure to clone this platform?
|
||||
confirm_unfreeze: Are you sure to defrost this platform?
|
||||
released_suffix: (released)
|
||||
confirm_delete: Are you sure to delete this platform?
|
||||
|
|
|
@ -6,6 +6,7 @@ ru:
|
|||
list: Список
|
||||
new: Создать
|
||||
edit: Редактировать
|
||||
about: О платформе
|
||||
new_header: Новая платформа
|
||||
edit_header: Редактировать
|
||||
list_header: Платформы
|
||||
|
@ -22,7 +23,7 @@ ru:
|
|||
freeze: Заморозить
|
||||
unfreeze: Разморозить
|
||||
confirm_freeze: Вы уверены, что хотите заморозить эту платформу?
|
||||
confirm_freeze: Вы уверены, что хотите клонировать эту платформу?
|
||||
confirm_clone: Вы уверены, что хотите клонировать эту платформу?
|
||||
confirm_unfreeze: Вы уверены, что хотите разморозить эту платформу?
|
||||
released_suffix: (выпущена)
|
||||
confirm_delete: Вы уверены, что хотите удалить эту платформу?
|
||||
|
|
|
@ -2,6 +2,8 @@ en:
|
|||
layout:
|
||||
products:
|
||||
list: List
|
||||
about: About product
|
||||
build_lists_monitoring: Build lists monitoring
|
||||
new: New product
|
||||
list_header: Products
|
||||
clone: Clone
|
||||
|
|
|
@ -2,6 +2,8 @@ ru:
|
|||
layout:
|
||||
products:
|
||||
list: Список
|
||||
about: О продукте
|
||||
build_lists_monitoring: Мониторинг сборочных заданий
|
||||
new: Новый продукт
|
||||
list_header: Продукты
|
||||
clone: Клонировать
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
en:
|
||||
layout:
|
||||
repositories:
|
||||
add_project_to: Add project to repository
|
||||
list: List
|
||||
about: About repository
|
||||
list_header: Repositories
|
||||
new: New repository
|
||||
new_header: New repository
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
ru:
|
||||
layout:
|
||||
repositories:
|
||||
add_project_to: Добавить проект к репозиторию
|
||||
list: Список
|
||||
about: О репозитории
|
||||
list_header: Репозитории
|
||||
new: Новый репозиторий
|
||||
new_header: Новый репозиторий
|
||||
|
|
|
@ -5,8 +5,8 @@ ru:
|
|||
page_gap: ...
|
||||
|
||||
datatables:
|
||||
previous_label: ‹ Пред.
|
||||
next_label: След. ›
|
||||
previous_label: ‹ Предыдущая
|
||||
next_label: Следующая ›
|
||||
first_label: « Первая
|
||||
last_label: Последняя »
|
||||
empty_label: Нет доступных данных
|
||||
|
|
|
@ -164,7 +164,7 @@ Rosa::Application.routes.draw do
|
|||
resources :repositories do
|
||||
member do
|
||||
get :add_project
|
||||
get :remove_project
|
||||
delete :remove_project
|
||||
get :projects_list
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class AddDescriptionToProducts < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :products, :description, :text
|
||||
execute "UPDATE products SET description = name"
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :products, :description
|
||||
end
|
||||
end
|
120
db/schema.rb
120
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20120306212914) do
|
||||
ActiveRecord::Schema.define(:version => 20120314162313) do
|
||||
|
||||
create_table "activity_feeds", :force => true do |t|
|
||||
t.integer "user_id", :null => false
|
||||
|
@ -23,8 +23,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
|
||||
create_table "arches", :force => true do |t|
|
||||
t.string "name", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "arches", ["name"], :name => "index_arches_on_name", :unique => true
|
||||
|
@ -33,8 +33,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.integer "user_id"
|
||||
t.string "provider"
|
||||
t.string "uid"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "authentications", ["provider", "uid"], :name => "index_authentications_on_provider_and_uid", :unique => true
|
||||
|
@ -45,8 +45,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.integer "arch_id"
|
||||
t.integer "pl_id"
|
||||
t.integer "bpl_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "build_list_items", :force => true do |t|
|
||||
|
@ -54,8 +54,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.integer "level"
|
||||
t.integer "status"
|
||||
t.integer "build_list_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "version"
|
||||
end
|
||||
|
||||
|
@ -69,8 +69,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.integer "project_id"
|
||||
t.integer "arch_id"
|
||||
t.datetime "notified_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_circle", :default => false
|
||||
t.text "additional_repos"
|
||||
t.string "name"
|
||||
|
@ -93,16 +93,16 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "name"
|
||||
t.string "ancestry"
|
||||
t.integer "projects_count", :default => 0, :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "comments", :force => true do |t|
|
||||
t.string "commentable_type"
|
||||
t.integer "user_id"
|
||||
t.text "body"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.decimal "commentable_id", :precision => 50, :scale => 0
|
||||
t.integer "project_id"
|
||||
end
|
||||
|
@ -111,8 +111,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "name", :null => false
|
||||
t.integer "project_id", :null => false
|
||||
t.integer "owner_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "delayed_jobs", :force => true do |t|
|
||||
|
@ -124,8 +124,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.datetime "locked_at"
|
||||
t.datetime "failed_at"
|
||||
t.string "locked_by"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "queue"
|
||||
end
|
||||
|
||||
|
@ -137,8 +137,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "distro"
|
||||
t.string "platform"
|
||||
t.integer "counter", :default => 0
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "event_logs", :force => true do |t|
|
||||
|
@ -153,14 +153,14 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "controller"
|
||||
t.string "action"
|
||||
t.text "message"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "groups", :force => true do |t|
|
||||
t.integer "owner_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "uname"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.text "description"
|
||||
|
@ -173,8 +173,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "title"
|
||||
t.text "body"
|
||||
t.string "status", :default => "open"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "creator_id"
|
||||
t.datetime "closed_at"
|
||||
t.integer "closed_by"
|
||||
|
@ -205,8 +205,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "description"
|
||||
t.string "name"
|
||||
t.integer "parent_platform_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "released", :default => false
|
||||
t.integer "owner_id"
|
||||
t.string "owner_type"
|
||||
|
@ -219,8 +219,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.integer "platform_id"
|
||||
t.string "login"
|
||||
t.string "password"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "user_id"
|
||||
end
|
||||
|
||||
|
@ -228,8 +228,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.integer "product_id"
|
||||
t.integer "status", :default => 2, :null => false
|
||||
t.datetime "notified_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "product_build_lists", ["product_id"], :name => "index_product_build_lists_on_product_id"
|
||||
|
@ -239,8 +239,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.integer "platform_id", :null => false
|
||||
t.integer "build_status", :default => 2, :null => false
|
||||
t.string "build_path"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "build_script"
|
||||
t.text "counter"
|
||||
t.text "ks"
|
||||
|
@ -253,6 +253,7 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.boolean "system_wide", :default => false
|
||||
t.text "cron_tab"
|
||||
t.boolean "use_cron", :default => false
|
||||
t.text "description"
|
||||
end
|
||||
|
||||
create_table "project_imports", :force => true do |t|
|
||||
|
@ -260,8 +261,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "name"
|
||||
t.string "version"
|
||||
t.datetime "file_mtime"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "platform_id"
|
||||
end
|
||||
|
||||
|
@ -270,14 +271,14 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
create_table "project_to_repositories", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.integer "repository_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "projects", :force => true do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "owner_id"
|
||||
t.string "owner_type"
|
||||
t.string "visibility", :default => "open"
|
||||
|
@ -303,30 +304,29 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "token"
|
||||
t.boolean "approved", :default => false
|
||||
t.boolean "rejected", :default => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "interest"
|
||||
t.text "more"
|
||||
end
|
||||
|
||||
add_index "register_requests", ["email"], :name => "index_register_requests_on_email", :unique => true, :case_sensitive => false
|
||||
add_index "register_requests", ["token"], :name => "index_register_requests_on_token", :unique => true, :case_sensitive => false
|
||||
|
||||
create_table "relations", :force => true do |t|
|
||||
t.integer "object_id"
|
||||
t.string "object_type"
|
||||
t.integer "target_id"
|
||||
t.string "target_type"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "role"
|
||||
end
|
||||
|
||||
create_table "repositories", :force => true do |t|
|
||||
t.string "description", :null => false
|
||||
t.integer "platform_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "name", :null => false
|
||||
end
|
||||
|
||||
|
@ -334,8 +334,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.string "name", :null => false
|
||||
t.integer "arch_id", :null => false
|
||||
t.integer "project_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "rpms", ["project_id", "arch_id"], :name => "index_rpms_on_project_id_and_arch_id"
|
||||
|
@ -348,8 +348,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
t.boolean "new_comment_reply", :default => true
|
||||
t.boolean "new_issue", :default => true
|
||||
t.boolean "issue_assign", :default => true
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "new_comment_commit_owner", :default => true
|
||||
t.boolean "new_comment_commit_repo_owner", :default => true
|
||||
t.boolean "new_comment_commit_commentor", :default => true
|
||||
|
@ -358,8 +358,8 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
create_table "subscribes", :force => true do |t|
|
||||
t.string "subscribeable_type"
|
||||
t.integer "user_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "status", :default => true
|
||||
t.integer "project_id"
|
||||
t.decimal "subscribeable_id", :precision => 50, :scale => 0
|
||||
|
@ -367,18 +367,18 @@ ActiveRecord::Schema.define(:version => 20120306212914) do
|
|||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :default => "", :null => false
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||
t.string "reset_password_token"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "ssh_key"
|
||||
t.string "uname"
|
||||
t.string "role"
|
||||
t.string "language", :default => "en"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.string "language", :default => "en"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.text "professional_experience"
|
||||
t.string "site"
|
||||
t.string "company"
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
require Rails.root.join('lib/rails_datatables/rails_datatables')
|
||||
ActionView::Base.send :include, RailsDatatables
|
|
@ -60,7 +60,7 @@ module RailsDatatables
|
|||
|
||||
"sProcessing": '#{processing}'
|
||||
},
|
||||
"sPaginationType": "full_numbers",
|
||||
"sPaginationType": "will_paginate_like",
|
||||
"iDisplayLength": #{per_page},
|
||||
"bProcessing": true,
|
||||
"bServerSide": #{server_side},
|
||||
|
@ -81,6 +81,8 @@ module RailsDatatables
|
|||
} );
|
||||
}
|
||||
})#{append};
|
||||
|
||||
$('#datatable_wrapper').append("<div class='both'></div>");
|
||||
});
|
||||
</script>
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
//= require gollum/gollum.dialog
|
||||
//= require gollum/gollum.placeholder
|
||||
//= require gollum/editor/gollum.editor
|
||||
//= require jquery.dataTables
|
||||
//= require codemirror
|
||||
//= require codemirror/runmode
|
||||
//= require_tree ./codemirror/modes
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
require 'rake'
|
||||
require 'rake/testtask'
|
||||
require 'rake/rdoctask'
|
||||
|
||||
desc 'Default: run unit tests.'
|
||||
task :default => :test
|
||||
|
||||
desc 'Test the rails_datatables plugin.'
|
||||
Rake::TestTask.new(:test) do |t|
|
||||
t.libs << 'lib'
|
||||
t.libs << 'test'
|
||||
t.pattern = 'test/**/*_test.rb'
|
||||
t.verbose = true
|
||||
end
|
||||
|
||||
desc 'Generate documentation for the rails_datatables plugin.'
|
||||
Rake::RDocTask.new(:rdoc) do |rdoc|
|
||||
rdoc.rdoc_dir = 'rdoc'
|
||||
rdoc.title = 'RailsDatatables'
|
||||
rdoc.options << '--line-numbers' << '--inline-source'
|
||||
rdoc.rdoc_files.include('README')
|
||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
end
|
|
@ -1,2 +0,0 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
# Install hook code here
|
|
@ -1,2 +0,0 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
# Uninstall hook code here
|
Loading…
Reference in New Issue