Commit b5749f29 authored by matheusbsilva's avatar matheusbsilva

Merge branch 'plugin_dependeces_activation' into 'internship_plugin'

creates an installation script for the fga_internship plugin

See merge request arthur0496/noosfero!5
parents 26142713 1c54e848
Pipeline #55241812 failed with stage
in 17 minutes and 25 seconds
......@@ -76,4 +76,35 @@ class AdminPanelController < AdminController
def string_templates
end
def index
@system_settings_actions = [
[{action: 'site_info'},_('Environment settings')],
[{controller: 'features'}, _('Features')],
[{controller: 'plugins'},_('Plugins')],
[{controller:'environment_themes'},_('Appearance')],
[{controller: 'environment_design'},_('Sideboxes')],
[{action: 'set_portal_community'},_('Homepage')],
[{controller:'licenses'},_('Licenses')],
[{controller:'trusted_sites'},_('Trusted sites')],
[{controller:'environment_email_templates'},_('Email templates')],
[{controller:'captcha'},_('Captcha')],
[{action: 'string_templates'},_('Macros')]
]
@profiles_actions = [
[{controller: 'role'},_('User roles')],
[{controller: 'users'},_('Users')],
[{controller: 'organizations'},_('Organizations')],
[{controller: 'templates'},_('Profile templates')],
[{controller: 'features', action: 'manage_fields'},_('Fields')],
[{controller: 'kinds'},_('Kinds')],
[{controller: 'profile_quotas'}, _('Quotas')],
]
@enterprise_settings_actions = [
[{action: 'message_for_disabled_enterprise'},
_('Message for disabled enterprises')],
[{controller: 'region_validators'},_('Validators by region')],
[{controller: 'categories'},_('Categories')]
]
end
end
<h1><%= _('Administrator Panel') %></h1>
<h2><%= _('System settings') %></h2>
<ul class="admin-panel-items-list">
<%= link_to :action => 'site_info' do %>
<li class="admin-panel-menu-item">
<%= _('Environment settings') %>
</li>
<% end %>
<%= link_to :controller => 'features' do %>
<li class="admin-panel-menu-item">
<%= _('Features') %>
</li>
<% end %>
<%= link_to :controller => 'plugins' do %>
<li class="admin-panel-menu-item">
<%= _('Plugins') %>
</li>
<% end %>
<%= link_to :controller =>'environment_themes' do %>
<li class="admin-panel-menu-item">
<%= _('Appearance') %>
</li>
<% end %>
<%= link_to :controller => 'environment_design' do %>
<li class="admin-panel-menu-item">
<%= _('Sideboxes') %>
</li>
<% end %>
<%= link_to :action => 'set_portal_community' do %>
<li class="admin-panel-menu-item">
<%= _('Homepage') %>
</li>
<% end %>
<%= link_to :controller =>'licenses' do %>
<li class="admin-panel-menu-item">
<%= _('Licenses') %>
</li>
<% end %>
<%= link_to :controller =>'trusted_sites' do %>
<li class="admin-panel-menu-item">
<%= _('Trusted sites') %>
</li>
<% end %>
<%= link_to :controller =>'environment_email_templates' do %>
<li class="admin-panel-menu-item">
<%= _('Email templates') %>
</li>
<% end %>
<%= link_to :controller =>'captcha' do %>
<li class="admin-panel-menu-item">
<%= _('Captcha') %>
</li>
<% end %>
<%= link_to :action => 'string_templates' do %>
<li class="admin-panel-menu-item">
<%= _('Macros') %>
</li>
<% for action in @system_settings_actions %>
<%= link_to action.first do %>
<li class="admin-panel-menu-item">
<%= action.last %>
</li>
<% end %>
<% end %>
</ul>
<h2><%= _('Profiles') %></h2>
<ul class="admin-panel-items-list">
<%= link_to :controller => 'role' do %>
<li class="admin-panel-menu-item">
<%= _('User roles') %>
</li>
<% end %>
<%= link_to :controller => 'users' do %>
<li class="admin-panel-menu-item">
<%= _('Users') %>
</li>
<% end %>
<%= link_to :controller => 'organizations' do %>
<li class="admin-panel-menu-item">
<%= _('Organizations') %>
</li>
<% end %>
<%= link_to :controller => 'templates' do %>
<li class="admin-panel-menu-item">
<%= _('Profile templates') %>
</li>
<% end %>
<%= link_to :controller => 'features', :action => 'manage_fields' do %>
<li class="admin-panel-menu-item">
<%= _('Fields') %>
</li>
<% end %>
<%= link_to :controller => 'kinds' do %>
<li class="admin-panel-menu-item">
<%= _('Kinds') %>
</li>
<% end %>
<%= link_to :controller => 'profile_quotas' do %>
<li class="admin-panel-menu-item">
<%= _('Quotas') %>
</li>
<% for action in @profiles_actions %>
<%= link_to action.first do %>
<li class="admin-panel-menu-item">
<%= action.last %>
</li>
<% end %>
<% end %>
</ul>
......@@ -121,7 +32,7 @@
<% unless plugin_links.empty? %>
<h2><%= _('Plugins') %></h2>
<h2><%= _('Plugins') %></h2>
<ul class="admin-panel-items-list">
<% plugin_links.each do |link| %>
<%= link_to link[:url] do %>
......@@ -135,21 +46,13 @@
<h2><%= _('Enterprise-related settings') %></h2>
<ul class="admin-panel-items-list">
<%= link_to :action => 'message_for_disabled_enterprise' do %>
<li class="admin-panel-menu-item">
<%= _('Message for disabled enterprises') %>
</li>
<% end %>
<%= link_to :controller => 'region_validators' do %>
<li class="admin-panel-menu-item">
<%= _('Validators by region') %>
</li>
<% end %>
<%= link_to :controller => 'categories' do %>
<li class="admin-panel-menu-item">
<%= _('Categories') %>
</li>
<% for action in @enterprise_settings_actions %>
<%= link_to action.first do %>
<li class="admin-panel-menu-item">
<%= action.last %>
</li>
<% end %>
<% end %>
</ul>
......@@ -3,5 +3,5 @@
#FIXME The package is not working
unless(system 'gem list -i chartkick')
system 'gem install chartkick'
system 'gem install chartkick -v 2.3.5'
end
......@@ -14,6 +14,18 @@ class InternshipController < PublicController
def index
@community_id = params[:community_id]
unless Folder.find_by(:name => 'processos ativos', :profile_id => @community_id)
active_processes = Folder.new
active_processes.name = 'processos ativos'
active_processes.profile_id = @community_id
active_processes.save
end
unless Folder.find_by(:name => 'processos inativos', :profile_id => @community_id)
inactive_processes = Folder.new
inactive_processes.name = 'processos inativos'
inactive_processes.profile_id = @community_id
inactive_processes.save
end
end
def internship_pre_application
......@@ -23,6 +35,17 @@ class InternshipController < PublicController
@checklists << checklist
end
end
community = @process.community_id
active_processes = Folder.find_by(:name => 'processos ativos', :profile_id => community.id)
unless Folder.find_by(:name => self.current_user.name , :profile_id => community.id, :parent_id =>active_processes.id)
user_folder = Folder.new
user_folder.name = self.current_user.name
user_folder.profile_id = community.id
user_folder.parent_id = active_processes.id
user_folder.save
end
end
# call here the creation of supervisor's tmp user
......
system 'script/noosfero-plugins -q enable custom_forms work-assignment'
$light_gray: #f0f0f0;
$white: #fff;
$blue: #346392;
$dark_blue: #27496d;
$black: #000;
@import "color";
.abuse-report {
margin-top: 15px;
}
......@@ -12,7 +13,7 @@
justify-content: space-between;
margin-top: 5px;
a.abuse-reporter-name {
color: #000;
color: $black;
font-weight: bold;
}
.abuse-report-time,
......@@ -29,4 +30,4 @@
a.report-abuse-action {
border: none;
background: none;
}
\ No newline at end of file
}
@import "color";
.admin-panel-items-list {
list-style-type: none;
padding-left: 0;
......@@ -7,7 +9,7 @@
padding: 10px;
&:hover,
&:active {
background-color: #f0f0f0;
background-color: $light_gray;
}
}
......@@ -41,4 +43,4 @@ table.macros {
.macro-key {
font-style: italic;
}
}
\ No newline at end of file
}
@import "color";
.action-api-playground {
#api-token {
margin-left: 10px;
......@@ -17,7 +18,7 @@
}
}
#api-response {
color: #000;
color: $black;
border: 1px solid rgba(0, 0, 0, 0.3);
padding: 10px 15px;
box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
......@@ -32,4 +33,4 @@
background: #EDD;
}
}
}
\ No newline at end of file
}
@import "color";
audio.uploaded-file.file-audio {
width: 100%;
height: auto;
background-color: #000;
background-color: $black;
border-radius: 3px;
}
\ No newline at end of file
}
@import "color";
.highlights-block {
float: left;
background: transparent;
......@@ -11,7 +12,7 @@
.highlights-container {
width: 100%;
height: 300px;
background: #000;
background: $black;
.highlights-image-link, .highlights-img1, .highlights-img2 {
display: block;
width: 100%;
......@@ -68,7 +69,7 @@
margin-left: 5px;
}
a.activeSlide:visited, a.activeSlide {
color: #000;
color: $black;
}
}
}
......
@import "color";
.bullet-box {
margin-top: 15px;
border-top: 1px solid #e8e8e8;
......@@ -9,7 +10,7 @@
justify-content: space-between;
margin-top: 5px;
a.bullet-name {
color: #000;
color: $black;
font-weight: bold;
}
.bullet-time,
......@@ -17,4 +18,4 @@
color: #90949c;
}
}
}
\ No newline at end of file
}
$basic_button_color: #fff;
$default_button: #346392;
$default_button_hover: #27496d;
@import "color";
$basic_button_color: $white;
$default_button: $blue;
$default_button_hover: $dark_blue;
$default_button_border: #6496c8;
$red_button: #d9534f;
......
@import "color";
#view-category {
/* none */
}
......@@ -18,7 +20,7 @@
}
#content #category-ancestors a {
color: #000;
color: $black;
text-decoration: none;
}
......@@ -90,7 +92,7 @@ div#category-ajax-selector {
padding: 10px 0 10px 15px;
background-color: #f5f5f5;
&:nth-child(odd) {
background-color: #f0f0f0;
background-color: $light_gray;
}
&:hover {
border-left: 5px solid #ccc;
......
@import "color";
form.comment_form {
width: 100%;
min-width: 100%;
......@@ -127,7 +129,7 @@ form.comment_form {
box-sizing: border-box;
color: #333;
list-style: none;
background-color: #fff;
background-color: $white;
border-top: 1px solid #e8e8e8;
padding: 25px 0;
width: 100%;
......@@ -233,7 +235,7 @@ li.article-comment {
display: flex;
padding: 12px 0px 20px 0px;
margin-bottom: 3px;
background-color: #fff;
background-color: $white;
border-bottom: 1px solid #e8e8e8;
width: 100%;
.comment-author-pic {
......@@ -404,7 +406,7 @@ a.comment-picture {
#article .comment-footer {
font-size: 10px;
text-decoration: none;
color: #000;
color: $black;
}
#profile-activity .profile-activity-send-message a:hover,
......@@ -434,7 +436,7 @@ a.comment-picture {
text-decoration: none;
font-size: 14px;
font-weight: bold;
color: #000;
color: $black;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
......@@ -587,7 +589,7 @@ a.comment-picture {
.comment-replies .comment-created-at,
.comment-replies .comment-logged-out .comment-text,
.comment-logged-out h4 {
color: #000;
color: $black;
}
.comment-replies .comment-created-at {
......
@import "color";
@import 'zoomable-image';
@import 'content/blog';
@import 'content/event';
......@@ -99,7 +100,7 @@
a {
border: #e8e8e8 solid 1px;
background-color: #346392;
color: #fff;
color: $white;
display: inline-block;
font-size: 12px;
padding: 4px 8px;
......@@ -196,4 +197,4 @@ html.controller-cms #content .main-content {
>h1 {
margin-bottom: 0;
}
}
\ No newline at end of file
}
@import "color";
.image-gallery {
text-align: center;
......@@ -21,7 +22,7 @@
}
.image-gallery-item span a {
text-decoration: none;
color: #000
color: $black;
}
.image-gallery-item img {
padding: 2px;
......@@ -56,4 +57,3 @@
right: auto;
left: auto;
}
@import "color";
.fg-button span {
padding-top: 0.1em !important;
padding-bottom: 0.1em !important;
......@@ -40,9 +41,9 @@
}
body .ui-widget-overlay {
background: #000;
background: $black;
}
.ui-widget {
font-family: inherit !important;
}
\ No newline at end of file
}
/* Notice box */
@import "color";
div#notice {
background-color: #000;
background-color: $black;
color: white;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
......@@ -14,4 +15,4 @@ div#notice {
position: fixed;
top: 30px;
min-width: 206px;
}
\ No newline at end of file
}
@import "color";
.pagination {
margin: 20px 0px;
padding: 1em 0em;
......@@ -27,7 +29,7 @@
}
.current {
padding: 2px 8px;
color: #fff;
color: $white;
background-color: #212e3c;
border-radius: 4px;
font-weight: 700;
......@@ -56,4 +58,4 @@
.pagination a:hover {
color: #2e3436;
}
\ No newline at end of file
}
@import "color";
// FIXME prefix/scope general selectors
#highlighted-news {
font-size: 14px;
......@@ -71,9 +72,9 @@
.news-symbol {
background-color: #CCC;
color: #FFF;
color: $white;
}
.post-date {
color: #E68A00;
}
\ No newline at end of file
}
@import "color";
#profile-wall,
#profile-network,
#person-profile {
......@@ -81,7 +83,7 @@
display: flex;
padding: 12px 0px 20px 0px;
margin-bottom: 3px;
background-color: #fff;
background-color: $white;
border-bottom: 1px solid #e8e8e8;
width: 100%;
.profile-activity-image a img {
......@@ -825,9 +827,9 @@ ul.profile-network-activities-comments {
bottom: auto;
right: 0;
border: 1px solid;
background: #fff;
background: $white;
}
.article-translations .menu-submenu-list {
list-style: none;
}
\ No newline at end of file
}
@import "color";
.controller-profile_editor form {
input[type=submit]:disabled {
opacity: 0.5;
......@@ -286,7 +288,7 @@
}
.field-with-privacy-selector:hover {
background-color: #F0F0F0;
background-color: $light_gray;
}
.controller-profile_editor #profile-data .field-with-privacy-selector .formfieldline {
......@@ -384,4 +386,4 @@
.action-profile_editor-location .location-title {
display: none;
}
\ No newline at end of file
}
@import "color";
// FIXME: move to more specific places
.profile-list {
margin: 0px;
......@@ -35,7 +36,7 @@
.controller-friends .profile-list a.profile-link:hover,
.controller-followers .profile-list a.profile-link:hover,
.profiles-suggestions .profile-list a.profile-link:hover {
color: #FFF;
color: $white;
}
.controller-favorite_enterprises .profile-list .profile_link span,
......@@ -338,7 +339,7 @@
}
&:hover .menu-submenu-trigger {
display: block;
background: #fff url(../images/top-arrow.png) center center no-repeat;
background: $white url(../images/top-arrow.png) center center no-repeat;
border: 1px solid #CCC;
}
}
......@@ -389,7 +390,7 @@
top: 3px;
right: 2px;
text-transform: uppercase;
color: #FFF;
color: $white;
font-size: 9px;
background: #66CC33;
padding: 2px;
......@@ -424,4 +425,4 @@
text-align: center;
padding-top: 20px;
padding-bottom: 20px;
}
\ No newline at end of file
}
@import "color";
.profile-members-tabs-container .ui-corner-all {
overflow: auto;
}
......@@ -59,7 +60,7 @@
#last-admin-message {
background-color: #CCC;
color: #000;
color: $black;
font-size: 14px;
padding: 20px 15px;
-moz-border-radius: 10px;
......
@import "color";
#public-profile-search,
#profile-search-results form,
.profile-search-block form {
......@@ -44,7 +45,7 @@
}
#profile-search-results .article-details {
color: #000;
color: $black;
text-decoration: none;
}
......@@ -71,4 +72,4 @@
#profile-search-results .results-found-message {
margin-top: 10px;
font-style: italic;
}
\ No newline at end of file
}
@import "color";
.search-category-context {
margin: 30px 0px;
}
......@@ -129,7 +131,7 @@
a {
border: #e8e8e8 solid 1px;
background-color: #346392;
color: #fff;
color: $white;
display: inline-block;
font-size: 12px;
padding: 4px 8px;
......@@ -286,7 +288,7 @@
.controller-search #content .search-results-box a.see-more:hover {
background: #729FCF;
color: #FFF;
color: $white;
text-decoration: none;
}
......@@ -405,7 +407,7 @@
display: inline-block;
height: 14px;
line-height: 14px;
color: #FFF;
color: $white;
font-size: 10px;
}
......@@ -422,7 +424,7 @@
.search-article-categories .search-article-category {
background: #B1DFEF;
color: #000;
color: $black;
}
.search-article-categories a:hover.search-article-category {
......@@ -637,7 +639,7 @@ li.search-product-item {
background-color: #263238;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
color: #fff;
color