Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
EIP
Project Forum
Project Forum
Commits
09ab1686
Verified
Commit
09ab1686
authored
Nov 29, 2022
by
Martin Mladenov
Browse files
Hide inaccessible buttons from students
parent
509fda7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/views/dashboards/show.html.erb
View file @
09ab1686
...
...
@@ -15,11 +15,13 @@
<%
end
%>
<%
if
!
current_user
.
role_student?
||
@coached_groups
.
any?
||
@companies
.
any?
||
@research_groups
.
any?
%>
<div>
<div
class=
"row"
>
<div
class=
'col-xs-12'
>
<%=
link_to
text_lines
(
icon
(
:fas
,
'pen-to-square'
,
''
),
'Create Proposal'
),
new_project_path
,
{
class:
"thumbnail-inverse thumbnail--button"
,
style:
'border-width: 2px;'
}
%>
<%
if
can?
:create
,
Project
%>
<div
class=
"row"
>
<div
class=
'col-xs-12'
>
<%=
link_to
text_lines
(
icon
(
:fas
,
'pen-to-square'
,
''
),
'Create Proposal'
),
new_project_path
,
{
class:
"thumbnail-inverse thumbnail--button"
,
style:
'border-width: 2px;'
}
%>
</div>
</div>
<
/div
>
<
%
end
%
>
<div
class=
"row flex-container"
>
<div
class=
'col-xs-12 col-sm-6 flex-container flex-element'
style=
"min-width: 500px"
>
<%=
render
'dashboards/show/projects'
%>
...
...
app/views/dashboards/show/_organizations.html.erb
View file @
09ab1686
...
...
@@ -29,15 +29,17 @@
<h4
class=
"text-center"
>
You are not currently part of any organizations
</h4>
<%
end
%>
</div>
<div
class=
"text-center"
style=
"margin-top: auto"
>
<div
class=
"btn-group"
role=
"group"
>
<%=
link_to
glyphicon_text
(
'briefcase'
,
"Overview"
),
companies_path
,
class:
'btn btn-info'
%>
<%=
link_to
glyphicon_text
(
:pencil
,
"Create
#{
current_user
.
company_name
.
capitalize
}
"
),
new_company_path
,
class:
'btn btn-warning'
%>
<%
if
!
current_user
.
role_student?
||
current_user
.
involved_companies
(
%i[employee unconfirmed_employee]
).
any?
%>
<%
if
!
current_user
.
role_student?
||
current_user
.
involved_companies
(
%i[employee unconfirmed_employee]
).
any?
%>
<div
class=
"text-center"
style=
"margin-top: auto"
>
<div
class=
"btn-group"
role=
"group"
>
<%=
link_to
glyphicon_text
(
'briefcase'
,
"Overview"
),
companies_path
,
class:
'btn btn-info'
%>
<%
unless
current_user
.
role_student?
%>
<%=
link_to
glyphicon_text
(
:pencil
,
"Create
#{
current_user
.
company_name
.
capitalize
}
"
),
new_company_path
,
class:
'btn btn-warning'
%>
<%
end
%>
<%=
modal_button
"Join
#{
current_user
.
company_name
.
capitalize
}
"
,
'join-company'
,
class:
'btn btn-primary'
%>
<
%
end
%
>
<
/div
>
</div>
<
/div
>
<
%
end
%
>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment