Commit 92f71ed54d7739959d4feb8d787d322099aaf443
1 parent
fc7e02f2
Exists in
master
and in
28 other branches
[bsc-contract] Adding control panel button
(ActionItem2079)
Showing
2 changed files
with
22 additions
and
0 deletions
Show diff stats
plugins/bsc/lib/bsc_plugin.rb
@@ -22,6 +22,7 @@ class BscPlugin < Noosfero::Plugin | @@ -22,6 +22,7 @@ class BscPlugin < Noosfero::Plugin | ||
22 | buttons = [] | 22 | buttons = [] |
23 | buttons << {:title => _("Manage associated enterprises"), :icon => 'bsc-enterprises', :url => {:controller => 'bsc_plugin_myprofile', :action => 'manage_associated_enterprises'}} if bsc?(context.profile) | 23 | buttons << {:title => _("Manage associated enterprises"), :icon => 'bsc-enterprises', :url => {:controller => 'bsc_plugin_myprofile', :action => 'manage_associated_enterprises'}} if bsc?(context.profile) |
24 | buttons << {:title => _('Transfer ownership'), :icon => 'transfer-enterprise-ownership', :url => {:controller => 'bsc_plugin_myprofile', :action => 'transfer_ownership'}} if context.profile.enterprise? | 24 | buttons << {:title => _('Transfer ownership'), :icon => 'transfer-enterprise-ownership', :url => {:controller => 'bsc_plugin_myprofile', :action => 'transfer_ownership'}} if context.profile.enterprise? |
25 | + buttons << {:title => _("Manage contracts"), :icon => '', :url => {:controller => 'bsc_plugin_myprofile', :action => 'manage_contracts'}} if bsc?(context.profile) | ||
25 | buttons | 26 | buttons |
26 | end | 27 | end |
27 | 28 |
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +Feature: Bsc contract | ||
2 | +As a Bsc admin | ||
3 | +I would like to register a contract | ||
4 | +In order to make negotiations | ||
5 | + | ||
6 | + Background: | ||
7 | + Given "Bsc" plugin is enabled | ||
8 | + And the folllowing "bsc" from "bsc_plugin" | ||
9 | + | business_name | identifier | company_name | cnpj | | ||
10 | + | Bsc Test | bsc-test | Bsc Test Ltda | 94.132.024/0001-48 | | ||
11 | + And I am logged in as admin | ||
12 | + | ||
13 | + Scenario: be able see the manage contracts button only if the profile is a Bsc | ||
14 | + Given the following community | ||
15 | + | name | identifier | | ||
16 | + | Sample Community | sample-community | | ||
17 | + When I am on Sample Community's control panel | ||
18 | + Then I should not see "Manage contracts" | ||
19 | + But I am on Bsc Test's control panel | ||
20 | + Then I should see "Manage contracts" | ||
21 | + |