Merge branch 'dev' into feature/api_v3_base

pull/1435/head
Marek Takac 11 years ago
commit 5d6618eea4
  1. BIN
      app/assets/fonts/openproject_icon/openproject-icon-font.eot
  2. 5
      app/assets/fonts/openproject_icon/openproject-icon-font.svg
  3. BIN
      app/assets/fonts/openproject_icon/openproject-icon-font.ttf
  4. BIN
      app/assets/fonts/openproject_icon/openproject-icon-font.woff
  5. 2
      app/assets/javascripts/angular/controllers/dialogs/settings.js
  6. 7
      app/assets/javascripts/angular/controllers/work-packages-controller.js
  7. 4
      app/assets/javascripts/angular/helpers/components/work-packages-helper.js
  8. 5
      app/assets/javascripts/angular/models/query.js
  9. 9
      app/assets/javascripts/angular/services/query-service.js
  10. 2
      app/assets/javascripts/autocompleter.js
  11. 1
      app/assets/javascripts/contextual_fieldset.js
  12. 2
      app/assets/javascripts/findDomElement.js
  13. 3
      app/assets/javascripts/members_select_boxes.js
  14. 4
      app/assets/javascripts/repository_navigation.js
  15. 1
      app/assets/javascripts/select_list_move.js
  16. 13
      app/assets/javascripts/timelines_select_boxes.js
  17. 2
      app/assets/javascripts/work_packages.js.erb
  18. 2
      app/assets/stylesheets/content/_action_menu_main.sass
  19. 25
      app/assets/stylesheets/content/_forms.md
  20. 56
      app/assets/stylesheets/content/_forms.sass
  21. 1
      app/assets/stylesheets/content/_legacy_actions.sass
  22. 1
      app/assets/stylesheets/content/_modal.sass
  23. 30
      app/assets/stylesheets/content/_wiki.sass
  24. 13
      app/assets/stylesheets/default/main.css.erb
  25. 7
      app/assets/stylesheets/fonts/_openproject_icon_font.md
  26. 15
      app/assets/stylesheets/fonts/_openproject_icon_font.sass
  27. 17
      app/assets/stylesheets/layout/_drop_down.sass
  28. 10
      app/assets/stylesheets/layout/_toolbar.css.sass
  29. 1
      app/controllers/api/v2/planning_element_journals_controller.rb
  30. 10
      app/controllers/api/v3/queries_controller.rb
  31. 9
      app/controllers/api/v3/work_packages_controller.rb
  32. 2
      app/controllers/boards_controller.rb
  33. 2
      app/controllers/copy_projects_controller.rb
  34. 142
      app/controllers/query_menu_items_controller.rb
  35. 1
      app/controllers/work_packages/moves_controller.rb
  36. 2
      app/helpers/application_helper.rb
  37. 2
      app/helpers/query_menu_items_helper.rb
  38. 1
      app/helpers/sort_helper.rb
  39. 6
      app/helpers/timelog_helper.rb
  40. 2
      app/models/board.rb
  41. 6
      app/models/group.rb
  42. 2
      app/models/group_user.rb
  43. 1
      app/models/issue_priority_custom_field.rb
  44. 2
      app/models/menu_items/wiki_menu_item.rb
  45. 2
      app/models/notifier.rb
  46. 1
      app/models/query_custom_field_column.rb
  47. 18
      app/models/setting.rb
  48. 1
      app/models/time_entry_activity_custom_field.rb
  49. 1
      app/models/time_entry_custom_field.rb
  50. 2
      app/models/token.rb
  51. 1
      app/models/user_custom_field.rb
  52. 2
      app/models/work_package.rb
  53. 2
      app/models/work_package/scheduling_rules.rb
  54. 2
      app/models/work_package/status_transitions.rb
  55. 1
      app/models/work_package_custom_field.rb
  56. 2
      app/services/reports/assignee_report.rb
  57. 2
      app/services/reports/author_report.rb
  58. 2
      app/services/reports/category_report.rb
  59. 2
      app/services/reports/priority_report.rb
  60. 8
      app/services/reports/report.rb
  61. 2
      app/services/reports/subproject_report.rb
  62. 1
      app/services/reports/type_report.rb
  63. 2
      app/services/reports/version_report.rb
  64. 4
      app/views/admin/plugins.html.erb
  65. 8
      app/views/admin/projects.html.erb
  66. 2
      app/views/api/v3/work_packages/index.api.rabl
  67. 1
      app/views/auth_sources/edit.html.erb
  68. 10
      app/views/auth_sources/index.html.erb
  69. 2
      app/views/common/list_attachments.json.erb
  70. 2
      app/views/copy_projects/copy_settings/_block_checkbox.html.erb
  71. 6
      app/views/custom_fields/_form.html.erb
  72. 26
      app/views/groups/_memberships.html.erb
  73. 44
      app/views/groups/_users.html.erb
  74. 2
      app/views/layouts/admin.html.erb
  75. 1
      app/views/members/_autocomplete_for_member.html.erb
  76. 6
      app/views/members/autocomplete_for_member.json.erb
  77. 2
      app/views/messages/_form.html.erb
  78. 30
      app/views/my/page_layout.html.erb
  79. 2
      app/views/projects/form/attributes/_project_type_id.html.erb
  80. 22
      app/views/projects/settings/_boards.html.erb
  81. 20
      app/views/projects/settings/_categories.html.erb
  82. 2
      app/views/queries/_filters.html.erb
  83. 26
      app/views/repositories/committers.html.erb
  84. 6
      app/views/settings/_mail_handler.html.erb
  85. 4
      app/views/settings/_projects.html.erb
  86. 8
      app/views/settings/_repositories.html.erb
  87. 1
      app/views/time_entries/reports/show.html.erb
  88. 2
      app/views/timelines/_custom_fields.html.erb
  89. 1
      app/views/timelines/_timeline.html.erb
  90. 2
      app/views/timelog/edit.html.erb
  91. 14
      app/views/types/_form.html.erb
  92. 2
      app/views/user_mailer/work_package_added.html.erb
  93. 1
      app/views/users/_mail_notifications.html.erb
  94. 26
      app/views/users/_memberships.html.erb
  95. 1
      app/views/users/_preferences.html.erb
  96. 18
      app/views/users/index.html.erb
  97. 12
      app/views/users/new.html.erb
  98. 2
      app/views/versions/_form.html.erb
  99. 1
      app/views/versions/edit.html.erb
  100. 2
      app/views/versions/index.html.erb
  101. Some files were not shown because too many files have changed in this diff Show More

@ -238,4 +238,9 @@
<glyph unicode="&#57570;" d="M44 433l128 0 0-51-128 0z m58-102l366 0 0-51-366 0z m169-102l99 0 0-52-99 0z m-218-103l365 0 0-51-365 0z m-44 307l17 0 0-358-17 0z m479 0l17 0 0-358-17 0z"/>
<glyph unicode="&#57571;" d="M174 387l51 0 0-51-51 0z m0-114l51 0 0-51-51 0z m0-116l51 0 0-51-51 0z m85 176l52 0 0-51-52 0z m0-118l52 0 0-51-52 0z"/>
<glyph unicode="&#57567;" d="M212 261l54 0 0-184-54 0z m198 132l-171-183-171 183z"/>
<glyph unicode="&#57572;" d="M171 131l-69-114-68 114z m-77 122l17 0 0-137-17 0z m254 126l68 113 69-113z m60 51l17 0 0-177-17 0z m-213-70l128 0 0-41-128 0z m0-89l128 0 0-37-128 0z m0-85l128 0 0-38-128 0z"/>
<glyph unicode="&#57573;" d="M174 435l171 0 0-56-171 0z m0-150l171 0 0-51-171 0z m0-114l171 0 0-52-171 0z m290-104l-8 0 0 17 17 0 0-9c0-3-4-8-9-8z m-25 0l-17 0 0 17 17 0z m-35 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-18 0 0 17 18 0z m-35 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-8 0c-6 0-9 3-9 8l0 9 17 0z m0 35l-17 0 0 19 17 0z m0 36l-17 0 0 19 17 0z m0 38l-17 0 0 19 17 0z m0 36l-17 0 0 18 17 0z m0 35l-17 0 0 19 17 0z m0 38l-17 0 0 19 17 0z m0 36l-17 0 0 8c0 6 3 9 9 9l8 0z m376 0l-17 0 0 17 17 0z m-35 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m-34 0l-18 0 0 17 18 0z m-35 0l-17 0 0 17 17 0z m-34 0l-17 0 0 17 17 0z m376 0l-17 0 0 17 8 0c5 0 9-3 9-9z m0-219l-17 0 0 19 17 0z m0 36l-17 0 0 19 17 0z m0 38l-17 0 0 19 17 0z m0 36l-17 0 0 18 17 0z m0 35l-17 0 0 19 17 0z m0 38l-17 0 0 19 17 0z"/>
<glyph unicode="&#57574;" d="M207 345l98 0 0-328-98 0z m300 150l-251-324-253 324z"/>
<glyph unicode="&#57575;" d="M63 381l384 0 0-35-384 0z m0-60l384 0 0-34-384 0z m97 184l0-95-97 0z m-97-387l384 0 0-34-384 0z m0-60l384 0 0-34-384 0z m97 184l0-95-97 0z"/>
<glyph unicode="&#57576;" d="M227 174l-68-114-69 114z m-77 278l17 0 0-329-17 0z m111-114l68 114 69-114z m60 51l17 0 0-329-17 0z"/>
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 75 KiB

@ -37,7 +37,7 @@ angular.module('openproject.workPackages.controllers')
}])
.controller('SettingsModalController', ['$scope', 'settingsModal', 'QueryService',
function($scope, settingsModal, QueryService) {
function($scope, settingsModal, QueryService) {
this.name = 'Settings';
this.closeMe = settingsModal.deactivate;
$scope.query = QueryService.getQuery();

@ -52,6 +52,8 @@ angular.module('openproject.workPackages.controllers')
// Setup
function initialSetup() {
$scope.query_id = null;
QueryService.resetAll();
setupPageParamsFromUrl($window.location);
initProject();
@ -175,8 +177,8 @@ angular.module('openproject.workPackages.controllers')
$scope.availableOptions = QueryService.getAvailableOptions(); // maybe generalize this approach
$scope.$watch('availableOptions.availableGroupedQueries', function(availableQueries) {
if (availableQueries) {
$scope.groups = [{ name: 'CUSTOM QUERIES', models: availableQueries['user_queries']},
{ name: 'GLOBAL QUERIES', models: availableQueries['queries']}];
$scope.groups = [{ name: 'GLOBAL QUERIES', models: availableQueries['queries']},
{ name: 'CUSTOM QUERIES', models: availableQueries['user_queries']}];
}
});
}
@ -236,7 +238,6 @@ angular.module('openproject.workPackages.controllers')
});
$rootScope.$on('queryResetRequired', function(event, message) {
$scope.query_id = null;
initialSetup();
});

@ -97,9 +97,9 @@ angular.module('openproject.workPackages.helpers')
formatValue: function(value, dataType) {
switch(dataType) {
case 'datetime':
return dateFilter(WorkPackagesHelper.parseDateTime(value), 'medium');
return value ? dateFilter(WorkPackagesHelper.parseDateTime(value), 'medium') : '';
case 'date':
return dateFilter(value, 'mediumDate');
return value ? dateFilter(WorkPackagesHelper.parseDateTime(value), 'mediumDate') : '';
case 'currency':
return currencyFilter(value, 'EUR ');
default:

@ -185,10 +185,7 @@ angular.module('openproject.models')
var selectedColumns = this.columns.map(function(column) {
return column.name;
});
// To be able to group the work packages we need to add in the group by column if it is not already in the selected columns
if(selectedColumns.indexOf(this.groupBy) == -1){
selectedColumns.push(this.groupBy);
}
return selectedColumns;
},

@ -89,6 +89,15 @@ angular.module('openproject.services')
query = null;
},
resetAll: function(){
QueryService.resetQuery();
availableOptions = {};
availableColumns = [],
availableUnusedColumns = [],
availableFilterValues = {},
availableFilters = {};
},
getQuery: function() {
return query;
},

@ -223,4 +223,4 @@
callback(data);
}
};
}(jQuery));
}(jQuery));

@ -32,4 +32,3 @@ jQuery(document).ready(function($) {
event.stopPropagation();
});
});

@ -59,4 +59,4 @@
}
};
})( jQuery );
})( jQuery );

@ -53,7 +53,7 @@ jQuery(document).ready(function($) {
formatItemSelection = function (item) {
return item.name;
};
$("#members_add_form select.select2-select").each(function (ix, elem){
if ($(elem).hasClass("remote") || $(elem).attr("data-ajaxURL") !== undefined) {
// remote loading
@ -110,4 +110,3 @@ jQuery(document).ready(function($) {
memberstab.click(init_members_cb);
}
});

@ -27,7 +27,7 @@
//++
Event.observe(window,'load',function() {
/*
/*
If we're viewing a tag or branch, don't display it in the
revision box
*/
@ -37,7 +37,7 @@ Event.observe(window,'load',function() {
$('rev').setValue('');
}
/*
/*
Copy the branch/tag value into the revision box, then disable
the dropdowns before submitting the form
*/

@ -64,4 +64,3 @@ function moveOptionDown(selectionId) {
function selectAllOptions(id) {
jQuery("#" + id + " option").attr('selected',true);
}

@ -39,7 +39,7 @@ jQuery(document).ready(function($) {
$("#timeline_options_grouping_two_sort"),
$("#timeline_options_planning_element_time_relative_one_unit"),
$("#timeline_options_planning_element_time_relative_two_unit")
].each(function (item) {
].forEach(function (item) {
$("input[name='" + $(item).attr("name")+"']").remove();
$(item).select2({
@ -69,7 +69,7 @@ jQuery(document).ready(function($) {
$("#timeline_options_planning_element_responsibles"),
$("#timeline_options_planning_element_assignee"),
$("#timeline_options_grouping_two_selection")
].each(function (item) {
].forEach(function (item) {
$(item).autocomplete({ multiple: true,
ajax: {null_element: {id: -1, name: I18n.t("js.filter.noneElement")}}
});
@ -79,7 +79,7 @@ jQuery(document).ready(function($) {
$("#timeline_options_planning_element_types"),
$("#timeline_options_planning_element_time_types"),
$("#timeline_options_planning_element_status")
].each(function (item) {
].forEach(function (item) {
$(item).autocomplete({
multiple: true
});
@ -94,7 +94,7 @@ jQuery(document).ready(function($) {
[
$("#reporting_reporting_to_project_id"),
$("#project_association_select_project_b_id")
].each(function (item) {
].forEach(function (item) {
// Stuff borrowed from Core application.js Project Jump Box
$(item).autocomplete({
multiple: false,
@ -112,7 +112,7 @@ jQuery(document).ready(function($) {
[
$("#timeline_options_grouping_one_selection")
].each(function (item) {
].forEach(function (item) {
// Stuff borrowed from Core application.js Project Jump Box
$(item).autocomplete({
multiple: true,
@ -131,7 +131,7 @@ jQuery(document).ready(function($) {
[
$("#timeline_options_parents")
].each(function (item) {
].forEach(function (item) {
// Stuff borrowed from Core application.js Project Jump Box
$(item).autocomplete({
multiple: true,
@ -168,4 +168,3 @@ jQuery(document).ready(function($) {
field.closest("fieldset").removeClass('collapsed').children("div").show();
}
});

@ -35,7 +35,7 @@ var WorkPackage = WorkPackage || {};
var init;
init = function () {
$.ajaxAppend({
trigger: '.action_menu_specific .edit',
indicator_class: 'ajax-indicator',

@ -30,7 +30,6 @@
ul
list-style-type: none
margin: 0
width: 200px
border: 1px solid #dddddd
box-shadow: 1px 1px 4px #cccccc
@ -41,6 +40,7 @@
padding: 4px 13px 4px 10px
&:hover
background: #f0f0f0
cursor: pointer
&.has-no-icon
padding: 4px 10px 4px 35px
&.dropdown-divider

@ -1 +1,26 @@
# Forms
```
<label class="checkbox-label">
<input type="checkbox">
<div class="styled-checkbox"></div>
</label>
<br>
<br>
<label class="checkbox-label">
checkbox label
<input type="checkbox">
<div class="styled-checkbox"></div>
</label>
<br>
<br>
<label class="checkbox-label">
<input type="checkbox">
<div class="styled-checkbox"></div>
checkbox label
</label>
```

@ -171,3 +171,59 @@ fieldset
width: auto
margin-left: 0
font-weight: normal
.checkbox-label
position: relative
display: inline-block
vertical-align: top
line-height: 18px
user-select: none
input[type=checkbox]
border: 0
clip: rect(0 0 0 0)
height: 18px
margin: 0 -18px -18px 0
overflow: hidden
padding: 0
position: absolute
width: 18px
opacity: 0.001
\:checked + .styled-checkbox:after
opacity: 1
\:focus + .styled-checkbox:before
.styled-checkbox
display: inline-block
vertical-align: top
width: 18px
height: 18px
padding: 0 5px
user-select: none
&:before
content: ''
position: absolute
box-sizing: border-box
width: 18px
height: 18px
background: #ffffff
border: 1px solid #cacaca
border-radius: 2px
cursor: pointer
box-shadow: inset 0 1px #fff
&:after
opacity: 0
content: ''
position: absolute
margin: 5px 2px
/* Length of check tail
width: 11px
/* Lenght of check foot
height: 3px
background: transparent
border: 3px solid #666666
border-top: none
border-right: none
@include transform(rotate(-50deg))

@ -83,4 +83,3 @@ ul.legacy-actions-more
.message-reply-menu
@include contextual(-39px)

@ -77,7 +77,6 @@ $ng-modal-image-width: $ng-modal-image-height
#modal-sorting
min-width: 900px
.select2-container
@media(max-width: 1800px)
width: 280px

@ -28,6 +28,11 @@
@import global/all
div.wiki
font-size: 14px
line-height: 1.6em
h1, h2
margin: 1em 0 1em 0
table
border: 1px solid #505050
border-collapse: collapse
@ -57,7 +62,6 @@ div.wiki
margin-right: 12px
margin-left: 0
display: table
font-size: 0.8em
&.right
float: right
margin-left: 12px
@ -76,13 +80,22 @@ div.wiki
padding-left: 16px
li
list-style-type: none
ul
margin: 0
padding: 0
ol, ul
padding: 0 0 0 2em
margin: 0.3em 0
li
list-style-position: outside
margin: 0
li li
margin-left: 1.5em
ol li
list-style-type: decimal
ul li
list-style-type: disc
fieldset legend
font-weight: bold
font-size: 10px
@ -103,6 +116,8 @@ h1:hover, h2:hover, h3:hover
color: #ddd
.wiki
p
margin-bottom: 1em
p, span
&.see-also, &.caution, &.important, &.info, &.tip, &.note
display: block
@ -162,6 +177,9 @@ h1:hover, h2:hover, h3:hover
background: url(image-path('wiki_styles/note_small.png')) 5px 4px no-repeat #F5FFFA
border: 1px solid #C7CFCA
.wiki-content
width: 700px
.controller-wiki
#content
overflow: visible

@ -1028,16 +1028,10 @@ table.files {
#content blockquote, .wiki ol, .wiki ul {
padding-left: 22px;
}
.wiki p {
margin-bottom: 5px;
}
blockquote {
font-style: italic;
background: url(<%= asset_path 'blockquote-bg.png' %>) no-repeat 5px 3px;
}
.wiki ul li {
list-style: disc inside none;
}
.file-thumbs {
margin: 20px 0 0;
overflow: hidden;
@ -1434,11 +1428,6 @@ tr.time-entry {
display: none;
}
/* comments */
.wiki ol li {
list-style: decimal inside;
}
/* scm */
#content table .changeset td.id a:hover {
text-decoration: underline;
@ -1703,7 +1692,7 @@ content {
padding-bottom: 11px;
}
#history .journal, #content .wiki-content p, #content .wiki-content li {
#history .journal {
width: 700px;
}

@ -238,5 +238,10 @@
<i class="icon-table-view"></i>
<i class="icon-table-detail-view"></i>
<i class="icon-timeline-view"></i>
<i class="icon-toggler"></i>
<i class="icon-toggle"></i>
<i class="icon-sort-by"></i>
<i class="icon-group-by"></i>
<i class="icon-filter-big"></i>
<i class="icon-group-by2"></i>
<i class="icon-sort-by2"></i>
```

@ -913,6 +913,21 @@ dt > .icon-wiki-page:before,
.icon-toggle:before
content: "\e0e3"
.icon-sort-by:before
content: "\e0e4"
.icon-group-by:before
content: "\e0e5"
.icon-filter-big:before
content: "\e0e6"
.icon-group-by2:before
content: "\e0e7"
.icon-sort-by2:before
content: "\e0e8"
/* remove once all menu items have an icon */
.no-icon

@ -43,16 +43,16 @@
.dropdown .dropdown-menu,
.dropdown .dropdown-panel
min-width: 160px
min-width: 200px
max-width: 360px
list-style: none
background: #FFF
border: solid 1px #DDD
border: solid 1px rgba(0, 0, 0, .2)
border-radius: 0px
box-shadow: 0 5px 10px rgba(0, 0, 0, .2)
box-shadow: 1px 1px 4px #cccccc
overflow: visible
padding: 4px 0
padding: 3px 0
margin: 0
.dropdown .dropdown-panel
@ -104,11 +104,11 @@
.dropdown .dropdown-menu LI > A,
.dropdown .dropdown-menu LABEL
display: block
color: #555
color: $main_menu_font_color
text-decoration: none
line-height: 18px
padding: 3px 32px
padding: 4px 13px 4px 10px
white-space: nowrap
font-weight: normal
.dropdown .dropdown-menu LI > A:hover,
.dropdown .dropdown-menu LABEL:hover
@ -120,9 +120,8 @@
.dropdown LI > A.dropdown-menu-hasicons
display: block
color: #555
color: $main_menu_font_color
text-decoration: none
line-height: 18px
padding: 3px 10px
white-space: nowrap
@ -131,7 +130,7 @@
font-size: 1px
border-top: solid 1px #E5E5E5
padding: 0
margin: 4px 0
margin: 3px 0
/* Icon Examples - icons courtesy of http://p.yusukekamiyamane.com/ */
.dropdown.has-icons LI > A

@ -58,6 +58,10 @@
li
float: none
.dropdown-scrollable
overflow-y: auto
max-height: 500px
#querySelectDropdown
min-width: 250px
border: 1px solid #dddddd
@ -69,11 +73,11 @@
clear: both
width: 100%
display: block
ul.query-menu
ul.query-menu
width: 100%
margin: 0 0 10px 0
float: left
li
li
padding: 4px 25px
display: block
&:hover
@ -85,7 +89,7 @@
&:hover
text-decoration: none
.search-query-wrapper
padding: 15px
padding: 15px
input
margin: 0 auto
width: 100%

@ -110,23 +110,23 @@ module Api::V3
def setup_query_for_create
@query = Query.new params[:query] ? permitted_params.query : nil
@query.project = @project unless params[:query_is_for_all]
prepare_query @query
prepare_query
@query.user = User.current
end
def setup_existing_query
@query = Query.find(params[:id])
prepare_query(@query)
prepare_query
end
# Note: Not dry - lifted straight from old queries controller
def prepare_query(query)
def prepare_query
@query.is_public = false unless User.current.allowed_to?(:manage_public_queries, @project) || User.current.admin?
view_context.add_filter_from_params if params[:fields] || params[:f]
@query.group_by ||= params[:group_by]
@query.group_by = params[:group_by] if params[:group_by].present?
@query.sort_criteria = prepare_sort_criteria if params[:sort]
@query.project = nil if params[:query_is_for_all]
@query.display_sums ||= params[:display_sums].present?
@query.display_sums = params[:display_sums] if params[:display_sums].present?
@query.column_names = params[:c] if params[:c]
@query.column_names = nil if params[:default_columns]
@query.name = params[:name] if params[:name]

@ -51,7 +51,14 @@ module Api
def index
@custom_field_column_names = @query.columns.select{|c| c.name.to_s =~ /cf_(.*)/}.map(&:name)
@column_names = ['id'] | @query.columns.map(&:name) - @custom_field_column_names
@column_names = [:id] | @query.columns.map(&:name) - @custom_field_column_names
if !@query.group_by.blank?
if @query.group_by =~ /cf_(.*)/
@custom_field_column_names << @query.group_by
else
@column_names << @query.group_by.to_sym
end
end
# determine what actions may be performed
@allowed_statuses = @work_packages.map do |i|

@ -52,7 +52,7 @@ class BoardsController < ApplicationController
def show
sort_init 'updated_on', 'desc'
sort_update 'created_on' => "#{Message.table_name}.created_on",
sort_update 'created_on' => "#{Message.table_name}.created_on",
'replies' => "#{Message.table_name}.replies_count",
'updated_on' => "#{Message.table_name}.updated_on"

@ -94,4 +94,4 @@ class CopyProjectsController < ApplicationController
end
true
end
end
end

@ -28,75 +28,75 @@
#++
class QueryMenuItemsController < ApplicationController
before_filter :load_project_and_query
before_filter :authorize
def create
@query_menu_item = MenuItems::QueryMenuItem.find_or_initialize_by_name_and_navigatable_id normalized_query_name, @query.id, title: @query.name
if @query_menu_item.save
flash[:notice] = l(:notice_successful_create)
else
flash[:error] = l(:error_menu_item_not_created)
end
redirect_to query_path
end
def update
@query_menu_item = MenuItems::QueryMenuItem.find params[:id]
if @query_menu_item.update_attributes query_menu_item_params
flash[:notice] = l(:notice_successful_update)
else
flash[:error] = l(:error_menu_item_not_saved)
end
redirect_to query_path
end
def destroy
@query_menu_item = MenuItems::QueryMenuItem.find params[:id]
@query_menu_item.destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to query_path
end
def edit
@query_menu_item = MenuItems::QueryMenuItem.find params[:id]
end
private
def load_project_and_query
@project = Project.find params[:project_id]
@query = Query.find params[:query_id]
end
def query_path
project_work_packages_path(@project, :query_id => @query.id)
end
def normalized_query_name
@query.name.parameterize.underscore
end
# inherit permissions from queries where create and update are performed bei new and edit actions
def authorize(ctrl = 'queries', action = params[:action], global = false)
action = case action
when 'create'
'new'
when 'update'
'edit'
else
action
end
super
end
def query_menu_item_params
params.require(:menu_items_query_menu_item).permit(:name, :title, :navigatable_id, :parent_id)
end
before_filter :load_project_and_query
before_filter :authorize
def create
@query_menu_item = MenuItems::QueryMenuItem.find_or_initialize_by_name_and_navigatable_id normalized_query_name, @query.id, title: @query.name
if @query_menu_item.save
flash[:notice] = l(:notice_successful_create)
else
flash[:error] = l(:error_menu_item_not_created)
end
redirect_to query_path
end
def update
@query_menu_item = MenuItems::QueryMenuItem.find params[:id]
if @query_menu_item.update_attributes query_menu_item_params
flash[:notice] = l(:notice_successful_update)
else
flash[:error] = l(:error_menu_item_not_saved)
end
redirect_to query_path
end
def destroy
@query_menu_item = MenuItems::QueryMenuItem.find params[:id]
@query_menu_item.destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to query_path
end
def edit
@query_menu_item = MenuItems::QueryMenuItem.find params[:id]
end
private
def load_project_and_query
@project = Project.find params[:project_id]
@query = Query.find params[:query_id]
end
def query_path
project_work_packages_path(@project, :query_id => @query.id)
end
def normalized_query_name
@query.name.parameterize.underscore
end
# inherit permissions from queries where create and update are performed bei new and edit actions
def authorize(ctrl = 'queries', action = params[:action], global = false)
action = case action
when 'create'
'new'
when 'update'
'edit'
else
action
end
super
end
def query_menu_item_params
params.require(:menu_items_query_menu_item).permit(:name, :title, :navigatable_id, :parent_id)
end
end

@ -112,4 +112,3 @@ class WorkPackages::MovesController < ApplicationController
end
end

@ -227,7 +227,7 @@ module ApplicationHelper
def format_version_name(version)
if version.project == @project
h(version)
h(version)
else
h("#{version.project} - #{version}")
end

@ -31,4 +31,4 @@ module QueryMenuItemsHelper
def update_query_menu_item_path(project, query_menu_item)
query_menu_item.persisted? ? query_menu_item_path(project, query_menu_item.query, query_menu_item) : query_menu_items_path(project, query_menu_item.query)
end
end
end

@ -265,4 +265,3 @@ module SortHelper
content_tag('th', sort_link(column, caption, default_order, :lang => lang), options)
end
end

@ -67,10 +67,10 @@ module TimelogHelper
end
def select_hours(data, criteria, value)
if value.to_s.empty?
data.select {|row| row[criteria].blank? }
if value.to_s.empty?
data.select {|row| row[criteria].blank? }
else
data.select {|row| row[criteria].to_s == value.to_s}
data.select {|row| row[criteria].to_s == value.to_s}
end
end

@ -36,7 +36,7 @@ class Board < ActiveRecord::Base
belongs_to :last_message, :class_name => 'Message', :foreign_key => :last_message_id
acts_as_list :scope => :project_id
acts_as_watchable
attr_protected :project_id
validates_presence_of :name, :description

@ -39,7 +39,7 @@ class Group < Principal
before_destroy :remove_references_before_destroy
alias_attribute(:groupname, :lastname)
validates_presence_of :groupname
validate :uniqueness_of_groupname
@ -109,8 +109,8 @@ class Group < Principal
Journal::WorkPackageJournal.update_all({ :assigned_to_id => deleted_user.id },
{ :assigned_to_id => id })
end
def uniqueness_of_groupname
groups_with_name = Group.where("lastname = ? AND id <> ?", groupname, id ? id : 0).count
if groups_with_name > 0

@ -30,6 +30,6 @@
class GroupUser < ActiveRecord::Base
belongs_to :group
belongs_to :user
validates_presence_of :group, :user
end

@ -32,4 +32,3 @@ class IssuePriorityCustomField < CustomField
:enumeration_work_package_priorities
end
end

@ -55,4 +55,4 @@ class MenuItems::WikiMenuItem < MenuItem
def new_wiki_page=(value)
options[:new_wiki_page] = value
end
end
end

@ -31,7 +31,7 @@ module Notifier
def self.notify?(event)
notified_events.include?(event.to_s)
end
def self.notified_events
Setting.notified_events.to_a
end

@ -52,4 +52,3 @@ class QueryCustomFieldColumn < QueryColumn
cv && @cf.cast_value(cv.value)
end
end

@ -30,15 +30,15 @@
class Setting < ActiveRecord::Base
DATE_FORMATS = [
'%Y-%m-%d',
'%d/%m/%Y',
'%d.%m.%Y',
'%d-%m-%Y',
'%m/%d/%Y',
'%d %b %Y',
'%d %B %Y',
'%b %d, %Y',
'%B %d, %Y'
'%Y-%m-%d',
'%d/%m/%Y',
'%d.%m.%Y',
'%d-%m-%Y',
'%m/%d/%Y',
'%d %b %Y',
'%d %B %Y',
'%b %d, %Y',
'%B %d, %Y'
]
TIME_FORMATS = [

@ -32,4 +32,3 @@ class TimeEntryActivityCustomField < CustomField
:enumeration_activities
end
end

@ -32,4 +32,3 @@ class TimeEntryCustomField < CustomField
:label_spent_time
end
end

@ -30,7 +30,7 @@
class Token < ActiveRecord::Base
belongs_to :user
validates_uniqueness_of :value
#attr_protected :user_id
before_create :delete_previous_tokens

@ -32,4 +32,3 @@ class UserCustomField < CustomField
:label_user_plural
end
end

@ -106,7 +106,7 @@ class WorkPackage < ActiveRecord::Base
scope :with_author, lambda { |author|
{:conditions => {:author_id => author.id}}
}
# <<< issues.rb <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
after_initialize :set_default_values

@ -64,4 +64,4 @@ module WorkPackage::SchedulingRules
1
end
end
end
end

@ -56,4 +56,4 @@ module WorkPackage::StatusTransitions
end
false
end
end
end

@ -38,4 +38,3 @@ class WorkPackageCustomField < CustomField
:label_work_package_plural
end
end

@ -49,4 +49,4 @@ class Reports::AssigneeReport < Reports::Report
@title ||= WorkPackage.human_attribute_name(:assigned_to)
end
end
end

@ -48,4 +48,4 @@ class Reports::AuthorReport < Reports::Report
def title
@title ||= WorkPackage.human_attribute_name(:author)
end
end
end

@ -48,4 +48,4 @@ class Reports::CategoryReport < Reports::Report
def title
@title ||= WorkPackage.human_attribute_name(:category)
end
end
end

@ -48,4 +48,4 @@ class Reports::PriorityReport < Reports::Report
def title
@title ||= WorkPackage.human_attribute_name(:priority)
end
end
end

@ -63,11 +63,3 @@ class Reports::Report
end
end

@ -48,4 +48,4 @@ class Reports::SubprojectReport < Reports::Report
def title
l(:label_subproject_plural)
end
end
end

@ -50,4 +50,3 @@ class Reports::TypeReport < Reports::Report
end
end

@ -49,4 +49,4 @@ class Reports::VersionReport < Reports::Report
@title ||= WorkPackage.human_attribute_name(:version)
end
end
end

@ -37,8 +37,8 @@ See doc/COPYRIGHT.rdoc for more details.
<tr class="<%= cycle('odd', 'even') %>">
<td><span class="name"><%=h plugin.name %></span>
<%= content_tag('span', h(plugin.description), :class => 'description') unless plugin.description.blank? %>
<%= content_tag('span', link_to(h(plugin.url), plugin.url), :class => 'url') unless plugin.url.blank? %>
</td>
<%= content_tag('span', link_to(h(plugin.url), plugin.url), :class => 'url') unless plugin.url.blank? %>
</td>
<td class="author"><%= plugin.author_url.blank? ? h(plugin.author) : link_to(h(plugin.author), plugin.author_url) %></td>
<td class="version"><%=h plugin.version %></td>
<td class="configure"><%= link_to(l(:button_configure), :controller => '/settings', :action => 'plugin', :id => plugin.id) if plugin.configurable? %></td>

@ -28,7 +28,7 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<div id="admin-index">
<%= render :partial => 'no_data' if @no_configuration_data %>
<%= render :partial => 'no_data' if @no_configuration_data %>
</div>
<% content_for :action_menu_specific do %>
@ -64,9 +64,9 @@ See doc/COPYRIGHT.rdoc for more details.
<tbody>
<% project_tree(@projects) do |project, level| %>
<tr class="<%= cycle("odd", "even") %> <%= project.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
<td class="name"><span><%= link_to project, settings_project_path(project), :title => project.short_description %></span></td>
<td align="center"><%= checked_image project.is_public? %></td>
<td align="center"><%= format_date(project.created_on) %></td>
<td class="name"><span><%= link_to project, settings_project_path(project), :title => project.short_description %></span></td>
<td align="center"><%= checked_image project.is_public? %></td>
<td align="center"><%= format_date(project.created_on) %></td>
<td class="buttons">
<%= link_to(l(:button_archive),
archive_project_path(project, :status => params[:status]),

@ -45,7 +45,7 @@ child @work_packages => :work_packages do
when Version
wp.send(column_name).as_json(only: [:id, :name])
when WorkPackage
wp.send(column_name).as_json(only: [:id, :name])
wp.send(column_name).as_json(only: [:id, :subject])
else
wp.send(column_name)
end

@ -35,4 +35,3 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>

@ -39,11 +39,11 @@ See doc/COPYRIGHT.rdoc for more details.
<table class="list">
<thead><tr>
<th><%= AuthSource.human_attribute_name(:name) %></th>
<th><%= AuthSource.human_attribute_name(:type) %></th>
<th><%= AuthSource.human_attribute_name(:host) %></th>
<th><%= l(:label_user_plural)%></th>
<th></th>
<th><%= AuthSource.human_attribute_name(:name) %></th>
<th><%= AuthSource.human_attribute_name(:type) %></th>
<th><%= AuthSource.human_attribute_name(:host) %></th>
<th><%= l(:label_user_plural)%></th>
<th></th>
</tr></thead>
<tbody>
<% for source in @auth_sources %>

@ -34,4 +34,4 @@ See doc/COPYRIGHT.rdoc for more details.
:url => url_for(:controller => '/attachments', :action => 'show', :id => a, :filename => a.filename),
:is_image => !!a.image? # doing the !! as image? for whatever reason returns null or a number
}
}.to_json.html_safe %>
}.to_json.html_safe %>

@ -31,4 +31,4 @@ See doc/COPYRIGHT.rdoc for more details.
<%= check_box_tag 'only[]', name, checked, :id => "only_#{name}" %>
<%= "#{label} (#{count})" %>
</label>
<% end %>
<% end %>

@ -95,14 +95,14 @@ function toggle_custom_field_format() {
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
break;
case "user":
case "user":
case "version":
Element.hide(p_length.parentNode);
Element.hide(p_regexp.parentNode);
if (p_searchable) Element.hide(p_searchable.parentNode);
hide_and_disable(p_values);
Element.hide(p_default_value);
break;
break;
default:
Element.show(p_length.parentNode);
Element.show(p_regexp.parentNode);
@ -206,7 +206,7 @@ jQuery(".locale_selector").each(function (index) {
<%= check_box_tag "custom_field[type_ids][]", type.id, (@custom_field.types.include? type), :id => "custom_field_type_ids_#{type.id}" %>
<%= content_tag :label, (type.is_standard) ? l(:label_custom_field_default_type) : h(type), :class => "no-css", :for => "custom_field_type_ids_#{type.id}" %>
<% end %>
<%= hidden_field_tag "custom_field[type_ids][]", '' %>
<%= hidden_field_tag "custom_field[type_ids][]", '' %>
</fieldset>
&nbsp;
<p><%= f.check_box :is_required %></p>

@ -33,16 +33,16 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="splitcontentleft">
<% if @group.memberships.any? %>
<table class="list memberships">
<thead><tr>
<th><%= Project.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>
<% @group.memberships.each do |membership| %>
<% next if membership.new_record? %>
<tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
<td class="project"><%=h membership.project %></td>
<thead><tr>
<th><%= Project.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>
<% @group.memberships.each do |membership| %>
<% next if membership.new_record? %>
<tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
<td class="project"><%=h membership.project %></td>
<td class="roles">
<span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span>
<%= form_tag(membership_of_group_path(@group, membership),
@ -50,7 +50,7 @@ See doc/COPYRIGHT.rdoc for more details.
:remote => true,
:id => "member-#{membership.id}-roles-form",
:style => 'display:none;') do %>
<p><% roles.each do |role| %>
<p><% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role) %> <%=h role %></label><br />
<% end %></p>
<p><%= submit_tag l(:button_change) %>
@ -64,8 +64,8 @@ See doc/COPYRIGHT.rdoc for more details.
:remote => true,
:class => 'icon icon-delete' %>
</td>
</tr>
</tbody>
</tr>
</tbody>
<% end; reset_cycle %>
</table>
<% else %>

@ -29,28 +29,28 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="splitcontentleft">
<% if @group.users.any? %>
<table class="list users">
<thead><tr>
<th><%= User.model_name.human %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>
<% @group.users.sort.each do |user| %>
<tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
<td class="user"><%= link_to_user user %></td>
<td class="buttons">
<table class="list users">
<thead><tr>
<th><%= User.model_name.human %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>
<% @group.users.sort.each do |user| %>
<tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
<td class="user"><%= link_to_user user %></td>
<td class="buttons">
<%= link_to l(:button_delete), member_of_group_path(@group, user),
:method => :delete,
:remote => :true,
:class => 'icon icon-delete' %>
</td>
</tr>
<% end %>
</tbody>
</table>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
@ -60,8 +60,8 @@ See doc/COPYRIGHT.rdoc for more details.
<%= form_tag(members_of_group_path(@group), :method => :post, :remote => true) do |f| %>
<fieldset><legend><%=l(:label_user_new)%></legend>
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
<%= observe_field(:user_search,
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
<%= observe_field(:user_search,
:frequency => 0.5,
:update => :users,
:url => { :controller => '/groups', :action => 'autocomplete_for_user', :id => @group },
@ -69,12 +69,12 @@ See doc/COPYRIGHT.rdoc for more details.
:method => :get)
%>
<div id="users">
<%= principals_check_box_tags 'user_ids[]', users %>
</div>
<div id="users">
<%= principals_check_box_tags 'user_ids[]', users %>
</div>
<p><%= submit_tag l(:button_add) %></p>
</fieldset>
</fieldset>
<% end %>
<% end %>

@ -31,7 +31,7 @@ See doc/COPYRIGHT.rdoc for more details.
default_breadcrumb) %>
<% @page_header_title = l(:label_administration) %>
<% content_for :main_menu do %>
<%= render :partial => 'admin/menu' %>
<%= render :partial => 'admin/menu' %>
<% end %>
<%= render :file => "layouts/base" %>

@ -56,4 +56,3 @@ See doc/COPYRIGHT.rdoc for more details.
</div>
<p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
<% end %>

@ -31,12 +31,12 @@ See doc/COPYRIGHT.rdoc for more details.
"results":
{
"items":[
<% @principals.each_with_index do |principal, ix| %>
<% @principals.each_with_index do |principal, ix| %>
{
"id": <%= principal.id.to_json.html_safe %>,
"name": <%= principal.name.to_json.html_safe %>
} <%= "," unless ix == @principals.length - 1 %>
<% end %> ],
} <%= "," unless ix == @principals.length - 1 %>
<% end %> ],
"total": <%= @total ? @total : @principals.size %>,
"more": <%= @more ? @more : 0 %>
}

@ -46,7 +46,7 @@ See doc/COPYRIGHT.rdoc for more details.
</p>
<% if !replying && !@message.new_record? && User.current.allowed_to?(:edit_messages, @project) %>
<p><label><%= Board.name.humanize %></label><br />
<p><label><%= Board.name.humanize %></label><br />
<%= f.select :board_id, @project.boards.collect {|b| [b.name, b.id]} %></p>
<% end %>

@ -34,9 +34,9 @@ function recreateSortables() {
Sortable.destroy('list-left');
Sortable.destroy('list-right');
Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'top') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'})
Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'left') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'})
Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'right') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})
Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'top') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'})
Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'left') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'})
Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => '/my', :action => 'order_blocks', :group => 'right') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})
}
function updateSelect() {
@ -87,24 +87,24 @@ function removeBlock(block) {
<%= render :partial => 'layouts/action_menu_specific' %>
<div id="list-top" class="block-receiver">
<% @blocks['top'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['top'] %>
<% @blocks['top'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['top'] %>
</div>
<div id="list-left" class="splitcontentleft block-receiver">
<% @blocks['left'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['left'] %>
<% @blocks['left'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['left'] %>
</div>
<div id="list-right" class="splitcontentright block-receiver">
<% @blocks['right'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['right'] %>
<% @blocks['right'].each do |b|
next unless MyController.available_blocks.keys.include? b %>
<%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %>
<% end if @blocks['right'] %>
</div>
<%= sortable_element 'list-top',

@ -27,4 +27,4 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<p><%= form.select :project_type_id, options_for_project_types, :include_blank => true %></p>
<p><%= form.select :project_type_id, options_for_project_types, :include_blank => true %></p>

@ -29,16 +29,16 @@ See doc/COPYRIGHT.rdoc for more details.
<% if @project.boards.any? %>
<table class="list">
<thead><tr>
<th><%= Board.model_name.human %></th>
<th><%= Board.human_attribute_name(:description) %></th>
<th></th>
<th></th>
</tr></thead>
<tbody>
<thead><tr>
<th><%= Board.model_name.human %></th>
<th><%= Board.human_attribute_name(:description) %></th>
<th></th>
<th></th>
</tr></thead>
<tbody>
<% @project.boards.each do |board|
next if board.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>">
next if board.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h board.name %></td>
<td><%=h board.description %></td>
<td class="small-icons" align="center">
@ -50,9 +50,9 @@ See doc/COPYRIGHT.rdoc for more details.
<%= link_to_if_authorized l(:button_edit), {:controller => '/boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete), {:controller => '/boards', :action => 'destroy', :project_id => @project, :id => board}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-delete' %>
</td>
</tr>
</tr>
<% end %>
</tbody>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>

@ -29,15 +29,15 @@ See doc/COPYRIGHT.rdoc for more details.
<% if @project.categories.any? %>
<table class="list">
<thead><tr>
<th><%= Category.model_name.human %></th>
<th><%= Category.human_attribute_name(:assigned_to) %></th>
<th></th>
</tr></thead>
<tbody>
<thead><tr>
<th><%= Category.model_name.human %></th>
<th><%= Category.human_attribute_name(:assigned_to) %></th>
<th></th>
</tr></thead>
<tbody>
<% for category in @project.categories %>
<% unless category.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>">
<% unless category.new_record? %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h(category.name) %></td>
<td><%=h(category.assigned_to.name) if category.assigned_to %></td>
<td class="buttons">
@ -50,8 +50,8 @@ See doc/COPYRIGHT.rdoc for more details.
:confirm => l(:text_are_you_sure),
:class => 'icon icon-delete' %>
</td>
</tr>
<% end %>
</tr>
<% end %>
<% end %>
</tbody>
</table>

@ -52,7 +52,7 @@ function toggle_filter(field) {
if (check_box.checked) {
Element.show("operators_" + field);
Form.Element.enable("operators_" + field);
Form.Element.enable("operators_" + field);
Form.Element.enable("values_" + field);
toggle_operator(field);
} else {

@ -38,26 +38,26 @@ See doc/COPYRIGHT.rdoc for more details.
<%= form_tag({}) do %>
<table class="list">
<thead>
<tr>
<th><%= User.human_attribute_name(:login) %></th>
<th><%= User.model_name.human %></th>
</tr>
<tr>
<th><%= User.human_attribute_name(:login) %></th>
<th><%= User.model_name.human %></th>
</tr>
</thead>
<tbody>
<% i = 0 -%>
<% @committers.each do |committer, user_id| -%>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h committer %></td>
<td>
<%= hidden_field_tag "committers[#{i}][]", committer %>
<%= select_tag "committers[#{i}][]", content_tag('option', "-- #{l :actionview_instancetag_blank_option} --", :value => '') + options_from_collection_for_select(@users, 'id', 'name', user_id.to_i) %>
</td>
</tr>
<% i += 1 -%>
<tr class="<%= cycle 'odd', 'even' %>">
<td><%=h committer %></td>
<td>
<%= hidden_field_tag "committers[#{i}][]", committer %>
<%= select_tag "committers[#{i}][]", content_tag('option', "-- #{l :actionview_instancetag_blank_option} --", :value => '') + options_from_collection_for_select(@users, 'id', 'name', user_id.to_i) %>
</td>
</tr>
<% i += 1 -%>
<% end -%>
</tbody>
</table>
<p><%= submit_tag(l(:button_update)) %></p>
<% end %>
<% end %>
<% end %>

@ -38,11 +38,11 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="box tabular settings">
<p><%= setting_check_box :mail_handler_api_enabled,
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }"%></p>
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }"%></p>
<p><%= setting_text_field :mail_handler_api_key, :size => 30,
:id => 'settings_mail_handler_api_key',
:disabled => !Setting.mail_handler_api_enabled? %>
:id => 'settings_mail_handler_api_key',
:disabled => !Setting.mail_handler_api_enabled? %>
<%= link_to_function l(:label_generate_key), "if ($('settings_mail_handler_api_key').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %>
</p>
</div>

@ -38,8 +38,8 @@ See doc/COPYRIGHT.rdoc for more details.
<p><%= setting_check_box :sequential_project_identifiers %></p>
<p><%= setting_select :new_project_user_role_id,
Role.find_all_givable.collect {|r| [r.name, r.id.to_s]},
:blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %></p>
Role.find_all_givable.collect {|r| [r.name, r.id.to_s]},
:blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %></p>
</div>
<%= submit_tag l(:button_save) %>

@ -33,12 +33,12 @@ See doc/COPYRIGHT.rdoc for more details.
<p><%= setting_check_box :autofetch_changesets %></p>
<p><%= setting_check_box :sys_api_enabled,
:onclick => "if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %></p>
:onclick => "if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %></p>
<p><%= setting_text_field :sys_api_key, :size => 30,
:id => 'settings_sys_api_key',
:disabled => !Setting.sys_api_enabled?,
:label => :setting_mail_handler_api_key %>
:id => 'settings_sys_api_key',
:disabled => !Setting.sys_api_enabled?,
:label => :setting_mail_handler_api_key %>
<%= link_to_function l(:label_generate_key), "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
</p>

@ -102,4 +102,3 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
<% html_title l(:label_spent_time), l(:label_report) %>

@ -60,4 +60,4 @@ custom_fields.each do |custom_field|
<%
end
end
%>
%>

@ -67,4 +67,3 @@ See doc/COPYRIGHT.rdoc for more details.
<% @timeline_header_included = true %>
<% end %>
<% end %>

@ -40,7 +40,7 @@ See doc/COPYRIGHT.rdoc for more details.
<p><%= f.text_field :comments, :size => 100 %></p>
<p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
<% @time_entry.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :time_entry, value %></p>
<p><%= custom_field_tag_with_label :time_entry, value %></p>
<% end %>
<%= call_hook(:view_timelog_edit_form_bottom, { :time_entry => @time_entry, :form => f }) %>
</div>

@ -41,13 +41,13 @@ See doc/COPYRIGHT.rdoc for more details.
<% if WorkPackageCustomField.all.any? %>
<p>
<label><%= l(:label_custom_field_plural) %></label>
<% WorkPackageCustomField.all.each do |field| %>
<label class="block">
<%= check_box_tag 'type[custom_field_ids][]',field.id, @type.custom_fields.include?(field) %>
<%= field.name %>
</label>
<% end %>
<label><%= l(:label_custom_field_plural) %></label>
<% WorkPackageCustomField.all.each do |field| %>
<label class="block">
<%= check_box_tag 'type[custom_field_ids][]',field.id, @type.custom_fields.include?(field) %>
<%= field.name %>
</label>
<% end %>
</p>
<%= hidden_field_tag 'type[custom_field_ids][]', '' %>
<% end %>

@ -30,5 +30,3 @@ See doc/COPYRIGHT.rdoc for more details.
<%= t(:text_work_package_added, :id => "##{@issue.id}", :author => @issue.author) %>
<hr />
<%= render :partial => 'issue_details', :locals => { :issue => @issue } %>

@ -39,4 +39,3 @@ See doc/COPYRIGHT.rdoc for more details.
<p><em><%= l(:text_user_mail_option) %></em></p>
<% end %>
<p><label><%= l(:label_user_mail_no_self_notified) %><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %></label></p>

@ -33,16 +33,16 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="splitcontentleft">
<% if @user.memberships.any? %>
<table class="list memberships">
<thead><tr>
<th><%= Project.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
<thead><tr>
<th><%= Project.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
<%= call_hook(:view_users_memberships_table_header, :user => @user )%>
</tr></thead>
<tbody>
<% @user.memberships.each do |membership| %>
<% next if membership.new_record? %>
<tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
</tr></thead>
<tbody>
<% @user.memberships.each do |membership| %>
<% next if membership.new_record? %>
<tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
<td class="project">
<%= link_to_project membership.project %>
</td>
@ -51,9 +51,9 @@ See doc/COPYRIGHT.rdoc for more details.
<%= form_for(:membership, :remote => true,
:url => { :action => 'edit_membership', :id => @user, :membership_id => membership },
:html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
<p><% roles.each do |role| %>
<p><% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role),
:disabled => membership.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
:disabled => membership.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
<% end %></p>
<p><%= submit_tag l(:button_change) %>
<%= link_to_function l(:button_cancel), "$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;" %></p>
@ -70,9 +70,9 @@ See doc/COPYRIGHT.rdoc for more details.
:class => 'icon icon-delete') if membership.deletable? %>
</td>
<%= call_hook(:view_users_memberships_table_row, :user => @user, :membership => membership, :roles => roles, :projects => projects )%>
</tr>
</tr>
<% end; reset_cycle %>
</tbody>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>

@ -36,4 +36,3 @@ See doc/COPYRIGHT.rdoc for more details.
<p><%= pref_fields.select :theme, OpenProject::Themes.all.map {|t| [t.name, t.identifier]}, :label => :label_theme %></p>
<% end %>
<% end %>

@ -65,10 +65,10 @@ See doc/COPYRIGHT.rdoc for more details.
<table class="list">
<thead>
<tr>
<%= sort_header_tag('login', :caption => User.human_attribute_name(:login)) %>
<%= sort_header_tag('firstname', :caption => User.human_attribute_name(:firstname)) %>
<%= sort_header_tag('lastname', :caption => User.human_attribute_name(:lastname)) %>
<%= sort_header_tag('mail', :caption => User.human_attribute_name(:mail)) %>
<%= sort_header_tag('login', :caption => User.human_attribute_name(:login)) %>
<%= sort_header_tag('firstname', :caption => User.human_attribute_name(:firstname)) %>
<%= sort_header_tag('lastname', :caption => User.human_attribute_name(:lastname)) %>
<%= sort_header_tag('mail', :caption => User.human_attribute_name(:mail)) %>
<%= sort_header_tag('admin', :caption => User.human_attribute_name(:admin), :default_order => 'desc') %>
<%= sort_header_tag('created_on', :caption => User.human_attribute_name(:created_on), :default_order => 'desc') %>
<%= sort_header_tag('last_login_on', :caption => User.human_attribute_name(:last_login_on), :default_order => 'desc') %>
@ -79,11 +79,11 @@ See doc/COPYRIGHT.rdoc for more details.
<tbody>
<% for user in @users -%>
<tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %> <%= 'blocked' if user.failed_too_many_recent_login_attempts? %>">
<td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
<td class="firstname"><%= h(user.firstname) %></td>
<td class="lastname"><%= h(user.lastname) %></td>
<td class="email"><%= mail_to(h(user.mail)) %></td>
<td align="center"><%= checked_image user.admin? %></td>
<td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
<td class="firstname"><%= h(user.firstname) %></td>
<td class="lastname"><%= h(user.lastname) %></td>
<td class="email"><%= mail_to(h(user.mail)) %></td>
<td align="center"><%= checked_image user.admin? %></td>
<td class="created_on" align="center"><%= format_time(user.created_on) %></td>
<td class="last_login_on" align="center">
<%= format_time(user.last_login_on) unless user.last_login_on.nil? %>

@ -35,10 +35,10 @@ See doc/COPYRIGHT.rdoc for more details.
:url => { :action => "create" },
:html => { :class => nil, :autocomplete => 'off' },
:as => :user do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
<p>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
</p>
<%= render :partial => 'form', :locals => { :f => f } %>
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
<p>
<%= submit_tag l(:button_create) %>
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
</p>
<% end %>

@ -41,7 +41,7 @@ See doc/COPYRIGHT.rdoc for more details.
<p><%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %></p>
<% @version.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :version, value %></p>
<p><%= custom_field_tag_with_label :version, value %></p>
<% end %>
</div>

@ -35,4 +35,3 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>

@ -68,7 +68,7 @@ See doc/COPYRIGHT.rdoc for more details.
<br />
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
<% if @project.descendants.active.any? %>
<%= hidden_field_tag 'with_subprojects', 0 %>
<%= hidden_field_tag 'with_subprojects', 0 %>
<br /><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
<% end %>
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save